Excel two way look up from a row and data range to give topmost column value

RealGii

New Member
Joined
Jan 1, 2019
Messages
6
Hi,

I am new to Excel Index/Match: Its a two way look up to index the column headings and using row match with a value which is part of the table.
The two look up criteria are 300 from column A, and 321 from the table to return corresponding Column headings in B1:G1.

So I tried the following: =INDEX(B1:G1,MATCH(300,A2:A7,.....What should I put here to Match 321 from the range B2:G7 to look upwards to row B1:G1 to get value in E1 (WK5)?


ABCDEFG
1WK1WK2WK3WK4WK5WK6
2100
546

<tbody>
</tbody>
368

<tbody>
</tbody>
278

<tbody>
</tbody>
225

<tbody>
</tbody>
189

<tbody>
</tbody>
164

<tbody>
</tbody>
3150
606

<tbody>
</tbody>
407
308

<tbody>
</tbody>
249

<tbody>
</tbody>
209

<tbody>
</tbody>
181

<tbody>
</tbody>
4200
666

<tbody>
</tbody>
447

<tbody>
</tbody>
338

<tbody>
</tbody>
273

<tbody>
</tbody>
229

<tbody>
</tbody>
198

<tbody>
</tbody>
5250
725

<tbody>
</tbody>
487

<tbody>
</tbody>
368

<tbody>
</tbody>
297

<tbody>
</tbody>
249

<tbody>
</tbody>
215

<tbody>
</tbody>
6300
785

<tbody>
</tbody>
527

<tbody>
</tbody>
398

<tbody>
</tbody>
321

<tbody>
</tbody>
269

<tbody>
</tbody>
232

<tbody>
</tbody>
7350
845

<tbody>
</tbody>
567

<tbody>
</tbody>
428

<tbody>
</tbody>
345

<tbody>
</tbody>
289

<tbody>
</tbody>
249

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Do you want to search 321 in 6th row only because 300 is in row 6 of column A.
If 321 is available in any other row that is to rejected.
 
Upvote 0
How about


Excel 2013/2016
ABCDEFGHIJ
1WK1WK2WK3WK4WK5WK6300WK4
2100546368278225189164321
3150606407308249209181
4200666447338273229198
5250725487368297249215
6300785527398321269232
7350845567428345289249
sheet1
Cell Formulas
RangeFormula
J1=INDEX(B1:G1,,MATCH(I2,INDEX(B2:G7,MATCH(I1,A2:A7,0),0),0))
 
Upvote 0
Is it guaranteed that there are no duplicates in A2:G7?


There will be certainly duplicates in the range A2:G7 (rounded off). I made the match by adding -1 in the formula condition to look for the smallest greater than value, which is what I wanted.
INDEX(B1:G1,,MATCH(I2,INDEX(B2:G7,MATCH(I1,A2:A7,0),0),-1))
 
Upvote 0
There will be certainly duplicates in the range A2:G7 (rounded off). I made the match by adding -1 in the formula condition to look for the smallest greater than value, which is what I wanted.
INDEX(B1:G1,,MATCH(I2,INDEX(B2:G7,MATCH(I1,A2:A7,0),0),-1))

Thanks for coming back. Since A2:A7 is in ascending order, the formula can be adapted to that...

=INDEX(B1:G1,,MATCH(I2,INDEX(B2:G7,MATCH(I1,A2:A7,1),0),-1))
 
Upvote 0

Forum statistics

Threads
1,216,671
Messages
6,132,041
Members
449,697
Latest member
bororob85

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