Forum Discussion
Zebari480
Sep 15, 2021Copper Contributor
Excel
How can I prevent the cell reference in my formula from shifting? I have a worksheet with columns from A to P, My IF formula in column G is =IF($J2=P2,"No Change",IF(AND($J2=4,P2<4),"New 4",IF(AND...
Zebari480
Sep 15, 2021Copper Contributor
Thanks for that but the $ doesn’t have an effect
Juliano-Petrukio
Sep 15, 2021Bronze Contributor
Excel shifts the position and reference when you add or delete column or row. It helps to keep relative reference. If your data is on column J and suddenly another column is add before J, it "shifts to the right" moving your reference to the next column. It makes sense because you are adding a column before that column. If you want to keep absolute reference on your formula you need to create another formula INDIRECT("YourCellReference")
=IF(INDIRECT("J2")=INDIRECT("P2").....
=IF(INDIRECT("J2")=INDIRECT("P2").....
- Zebari480Sep 16, 2021Copper ContributorThank you Juliano, it works now, however I have 87,000 lines so the row reference numbers are not changing when I drag the formula down, do you have a trick to overcome this?