# Formulas are changing unexpectedly. How to debug?

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 ...

I have never been able to solve this. It remains a perplexing problem.