Lookups that don't shift when new columns are inserted

Monty85

New Member
Joined
May 6, 2019
Messages
43
Office Version
  1. 365
Platform
  1. Windows
I don't seem to be having any luck trying to search for the solution I need so hoping for some help.

I have a spreadsheet I run that has various sheets which lookup data from a subset of columns from the source page.

When new data is received I insert a column at the start of this data which then shifts all my xlookup formulas across (following the original data that being looked up).

What im trying to do is not have this happen. So if my lookup formula is =XLOOKUP(A3,B:B,G:P) it will never change regardless of how many columns insert in-between Columns G and P.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
The only solution to your problem is structured tables. That way references stick to a particular column header.

Named range can be another solution if you don't want a structured table (Just tested it, it works)
 
Last edited:
Upvote 0
If you have a lot of similar formulas in your worksheet then you may wish to avoid the volatile function INDIRECT. If so, you could consider this non-volatile option.

Excel Formula:
=XLOOKUP(A3,B:B,INDEX(A:P,0,7):INDEX(A:P,0,16))
 
Upvote 1
If you have a lot of similar formulas in your worksheet then you may wish to avoid the volatile function INDIRECT. If so, you could consider this non-volatile option.

Excel Formula:
=XLOOKUP(A3,B:B,INDEX(A:P,0,7):INDEX(A:P,0,16))
Yeah there is heaps of instances where I will need to use this so while the INDIRECT function did work its probably not useable in practice.

Your solution is more labour intensive to set up but if it doesn't impact the spreadsheet performance I think its worth it.
 
Upvote 0
Cheers. Good luck with it. 🤞
Thanks. So far so good. I do have to wait for a calculation to take place when i initially insert the new column but that appears to be the only time. In theory I think this should mean that other users that access the spreadsheet won't have to deal with that - it will just be me when i update.

Thanks again - always a great help :)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,952
Members
449,095
Latest member
nmaske

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