Column references in formulas not updating as new columns are added

lmoseley7

Board Regular
Joined
Jul 9, 2013
Messages
151
I'm working on updating some overly complex and inefficient formulas in an Excel workbook. When doing so, I noticed one of the formulas that calculates a check figure wasn't working. After looking at the problem I noticed that the lookup range in the VLOOKUP columns was starting two columns to the left of my data. I remembered adding new columns to the left of the data previously and wondered why the references didn't update as the columns shifted. My calc mode is set to automatic and I'm using Excel 2013. I tested this with a quick example in a blank workbook and adding columns caused the formulas to update. Here is an example of the formula (please don't judge, I didn't write this and I will fix it using a UDF that I wrote, I just want to know why Excel isn't acting as expected).

Code:
=ROUND(VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,12,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,11,FALSE)+VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,27,FALSE)+VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,27,FALSE)+VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,29,FALSE)+VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,29,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,37,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,41,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,43,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,45,FALSE)+VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,47,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,49,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,51,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,53,FALSE)-VLOOKUP("GRAND TOTAL",$AH$62:$CJ$16055,55,FALSE),2)

So for reference, all the AH's should be AJ's and all the CJ's should be CL's. I could find and replace them, but I'm not keeping the formula anyway, I just wanted to know why the column references didn't shift with the data.

After initially typing this up, I thought, maybe I selected the range and manually moved it over rather than adding columns, so I tested that on my simple example and noticed that doing that would not update cell references, even if they were not absolute references. So then I tested adding an entire column to my actual workbook and only the second reference in the range, the CL reference, updated. The first remained AH. This makes no sense to me. Can someone educate me?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top