In my Calc-doc, when I update certain data cells, formulas in other places are unexpectedly changed. I can find no relationship between the data updates and the changing formulas. (EDIT1: I’m not editing formulas, I’m entering data.)
EDIT2: I am adding a lot more detail at the bottom of my question.
This problem started after I added some formulas with INDIRECT and OFFSET. But these formulas do not seem to have any connection or relationship to the cells having the problem. (EDIT: And maybe these new formulas are just a red herring. I mention them only in order to provide all the info I can think of.)
Not all cells change unexpected. Only columns L, M and T show the issue.
EDIT: to be clear, I am not editing any formulas when this strange error happens. All I am doing is entering new data into empty cells on a different sheet. When I come back to Sheet 1, the formulas in certain cells in columns L, M and T (e.g., L6) are now updated to include a reference to the sheet I was editing. But I was not editing those cells in the other sheet (e.g., L6). I was not even editing any formulas at all.
Details of the problem:
Sheet 1, cell L3 has this formula:
=IF(U3>0,(E3+F3+G3+H3+I3+J3+K3+O3)/U3,0)
On Sheet 10 (or about 10 other sheets), if I enter data into cells where there are no formulas, and no references I can find to cell L3 on Sheet 1, the formula above will be changed to:
=IF(U3>0,(sht22.P17+sht22.Q17+sht22.R17+sht22.S17+sht22.T17+sht22.U17+sht22.V17+O3)/U3,0)
I’m having trouble discovering the exact steps to reproduce the problem. The problem happens every single time I edit the Calc-doc. It affects the same cells every time. And I know roughly what causes it. But I don’t know the exact editing change that causes the formula to change. How can I go about tracing this or debugging it?
EDIT2:
More details:
- Calc-doc has 37 sheets.
- I only see the problem in sheet 1.
- Furthermore, I only see the problem in cells L3 to L7, M3 to M7, T3 to T7.
- In those cells, the formulas are changed as shown below. The changes happen in response to entering new data into sheets sht14 to sht 34.
- When entering data, I am not moving data or cells and I am not changing formulas.
- I am pasting data from a plain text document and from a new (unsaved) temporary CSV file opened in another Calc window.
- The new data is pasted into the next row available and it usually goes across columns C to AU.
- Tools > Detective > Trace Precendents does not show any precendents other than those expected by the simple formulas (e.g., =IF(U3>0,(E3+F3+G3+H3+I3+J3+K3+O3)/U3,0))
- I still have no idea why the formulas are changing.
For each cell that is affected, I am showing the original formula and then the changed formula below. (After each edit, I have to manually change the formulas back to the originals.)
L3:
=IF(U3>0,(E3+F3+G3+H3+I3+J3+K3+O3)/U3,0)
=IF(U3>0,(sht22.P17+sht22.Q17+sht22.R17+sht22.S17+sht22.T17+sht22.U17+sht22.V17+O3)/U3,0)
L4:
=IF(U4>0,(E4+F4+G4+H4+I4+J4+K4+O4)/U4,0)
=IF(U4>0,(sht16.P16+sht16.Q16+sht16.R16+sht16.S16+sht16.T16+sht16.U16+sht16.V16+O4)/U4,0)
L5:
=IF(U5>0,(E5+F5+G5+H5+I5+J5+K5+O5)/U5,0)
=IF(U5>0,(sht16.P17+sht16.Q17+sht16.R17+sht16.S17+sht16.T17+sht16.U17+sht16.V17+O5)/U5,0)
L6:
=IF(U6>0,(E6+F6+G6+H6+I6+J6+K6+O6)/U6,0)
=IF(U6>0,(sht20.P15+sht20.Q15+sht20.R15+sht20.S15+sht20.T15+sht20.U15+sht20.V15+O6)/U6,0)
L7:
=IF(U7>0,(E7+F7+G7+H7+I7+J7+K7+O7)/U7,0)
=IF(U7>0,(sht27.P16+sht27.Q16+sht27.R16+sht27.S16+sht27.T16+sht27.U16+sht27.V16+O7)/U7,0)
L8:
=IF(U8>0,(E8+F8+G8+H8+I8+J8+K8+O8)/U8,0)
no change after editing
L9:
all normal from L8 down; no change after editing
M3:
=IF(U3>0,(H3+I3+J3+K3+O3)/U3,0)
=IF(U3>0,(sht22.S17+sht22.T17+sht22.U17+sht22.V17+O3)/U3,0)
M4:
=IF(U4>0,(H4+I4+J4+K4+O4)/U4,0)
=IF(U4>0,(sht16.S16+sht16.T16+sht16.U16+sht16.V16+O4)/U4,0)
M5:
=IF(U5>0,(H5+I5+J5+K5+O5)/U5,0)
=IF(U5>0,(sht16.S17+sht16.T17+sht16.U17+sht16.V17+O5)/U5,0)
M6:
=IF(U6>0,(H6+I6+J6+K6+O6)/U6,0)
=IF(U6>0,(sht20.S15+sht20.T15+sht20.U15+sht20.V15+O6)/U6,0)
M7:
=IF(U7>0,(H7+I7+J7+K7+O7)/U7,0)
=IF(U7>0,(sht27.S16+sht27.T16+sht27.U16+sht27.V16+O7)/U7,0)
M8 and down:
=IF(U8>0,(H8+I8+J8+K8+O8)/U8,0)
(all normal; formulas do not change)
Columns N, O, P, Q, R, S are all normal
T3:
=E3+F3+G3+H3+I3+J3+K3+P3+R3
=sht22.P17+sht22.Q17+sht22.R17+sht22.S17+sht22.T17+sht22.U17+sht22.V17+P3+R3
T4:
=E4+F4+G4+H4+I4+J4+K4+P4+R4
=sht16.P16+sht16.Q16+sht16.R16+sht16.S16+sht16.T16+sht16.U16+sht16.V16+P4+R4
T5:
=E5+F5+G5+H5+I5+J5+K5+P5+R5
changes after editing similar to above
T6:
=E6+F6+G6+H6+I6+J6+K6+P6+R6
changes after editing similar to above
T7:
changes after editing similar to above
T8 and below:
(all normal; formulas do not change)