Index match, xlookup or both?

levy77

Board Regular
Joined
May 7, 2019
Messages
67
Hi, I'm trying to find a way to return a value based on an index match formula, if the returned value is 0 then move up until there is a number.

Column look up:A
Row look up:4
ABCDEF
10.340.360.240.750.370.12
20.150.740.350.010.02
30.980.050.870.360.70
40.310.530.490.44

In the example above I want to look up the value corresponding to column A and row 4 the formula would look something like =INDEX(B5:G8,MATCH(B2,A5:A8,0),match(B1,B5:B8,0))
In this case the returned cell would be B8 which has no value. Because B8="" I want the formula to move up until it finds a number then return that number. In this case, it would try return cell B8 but because that is equal to nothing it will return the cell B7=0.98. Does anyone have any idea of how to go about this? I have played around with ISNUMBER and the reverse search of XLOOKUP but keep getting an =N/A or Value error. Does anyone have any ideas?

Cheers.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I think this should do it (not tested)

=LOOKUP(1e+100,INDEX(B5:G5,1,MATCH(B1,B4:G4,0)):INDEX(B5:G8,MATCH(B2,A5:A8,0),MATCH(B1,B4:G4,0)))

It looks like your numbers are formatted as text in the example provided, if that is the case then this formula will not work.
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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