Problem with Index/Match parameters after sorting

mikemck

New Member
Joined
Apr 23, 2016
Messages
26
I have the following formula in cell AI2: =IFERROR(INDEX('EOL MATRIX'!$C$5:$C$144,MATCH('ALL SITES (3)'!K2,'EOL MATRIX'!$B$5:$B$144,0)),INDEX('EOL MATRIX'!$C$5:$C$144,MATCH('ALL SITES (3)'!M2,'EOL MATRIX'!$B$5:$B$144,0)))

It searches column K for a match and if one is not found, it then searches column M. All is fine, until any of the columns are resorted, and then the row numbers are skewed. The formula in cell AI2 changes to:

=IFERROR(INDEX('EOL MATRIX'!$C$5:$C$144,MATCH('ALL SITES (3)'!K6167,'EOL MATRIX'!$B$5:$B$144,0)),INDEX('EOL MATRIX'!$C$5:$C$144,MATCH('ALL SITES (3)'!M6167,'EOL MATRIX'!$B$5:$B$144,0)))

I have tried using absolute references, partial absolute, etc.

Can anyone tell me where I am going wrong?

TIA
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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