Share via

Excel adding column makes formulas incorrect

Anonymous
2023-12-07T15:34:39+00:00

Dear community,

I had set up an Excel file, encountered a problem and simplified it as follows:

As you can see the value and formula for D7 are incorrect, it should reference E6-D6, instead it was changed to:

=IFS(D$3>Last_date_month;0;TRUE;E6-C6) 

See here for sample file: https://1drv.ms/x/s!AtNwspiFU1pNj5MHSGgOIRWiUq54CA?e=TWWaJc

The reason for the mistake is that I added column B. I expected that all references would be adjusted accordingly, but this does not seem to be the case. As I don't understand Excel's behavior in this situation and want to avoid adjusting every formula after adding columns, I wonder why this could have happened or how Excel works in this situation.

Many thanks for your help!

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2023-12-07T20:33:45+00:00

    Sorry, no idea.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-12-07T17:58:04+00:00

    Thanks for your answer. I am trying to understand this particular example so that I know how excel updates references before I add a column and can maybe adjust how I add the column to avoid that I have to rework the process. Are there any rules / specific reasons why it would not have worked in this specific case?

    Many thanks!

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2023-12-07T17:29:51+00:00

    Excel automatically adjusts references when you insert or delete rows/columns. But in general, the formula should still work.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-12-07T16:42:41+00:00

    Of course, I am aware of these problems as I just created this small sample for the forum, but I am rather interested in the general principle: When does it occur that the referenced columns change when adding a column?

    Thanks for your help!

    Was this answer helpful?

    0 comments No comments
  5. HansV 462.6K Reputation points
    2023-12-07T16:31:49+00:00

    Last_date_month refers to another workbook, and the formula in D7 is not consistent with that in C7. I suggest creating the formulas again from scratch.

    Was this answer helpful?

    0 comments No comments