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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,214,832
Messages
6,121,851
Members
449,051
Latest member
excelquestion515

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