Problem with column including vlookup in table not sorting accurately

Festivalgeek

New Member
Joined
Jan 8, 2019
Messages
3
Hi - hope someone can help me as my brain is aching with trying to work this one out!

I have a large table with loads of columns - many of them including text but a few of them are vlookup formulae. When I sort the table on one of the text columns, the columns with the formulae in them go wrong.

As an example, one of the formulae is:

=(VLOOKUP('Sheet 1'!$D2,Table10,2,FALSE))

Columns A to C are text. If I now sort the table on column A to get it in alphabetical order, the formula shown above changes to read

=(VLOOKUP('Sheet 1'!$D8,Table10,2,FALSE))

BUT the problem is that the formula is physically still located in row 2 - so it is bring back the correct result but not putting it in the right place.

My research suggested that the problem is that sorting only works on text and that maybe using the INDIRECT function would solve it. So I tried:

=(VLOOKUP(INDIRECT("D2"),Table10,2,FALSE))

But the problem with this is that when the table auto fills, it just copies this exact formula down whereas I need the D2 to become D3, D4 etc.

Can any one help please?
 

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,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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