Need to lookup a value, meet horizontal criteria, return header

laycenew

New Member
Joined
Aug 23, 2018
Messages
1
Hi, I'm trying to lookup a value in a named table (Zoo), then search horizontally for the first match or if there is no match, the next greater number, and return the header.

Values in the columns will always increase from left to right.

Example:
Sam
7
Result: monkey

Example:
Sue
9
Result: cat


[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]dog[/TD]
[TD]cat[/TD]
[TD]bird[/TD]
[TD]horse[/TD]
[TD]monkey[/TD]
[TD]lizard[/TD]
[/TR]
[TR]
[TD]bob[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD]8[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]joe[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]7[/TD]
[TD]13[/TD]
[TD]20[/TD]
[TD]21[/TD]
[/TR]
[TR]
[TD]sam[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]8[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]joy[/TD]
[TD]5[/TD]
[TD]8[/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD]13[/TD]
[TD]17[/TD]
[/TR]
[TR]
[TD]sue[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD]21[/TD]
[/TR]
</tbody>[/TABLE]











Can someone please provide a solution? ANY kind of solution or workaround is appreciated.

I've been able to Google my answers for years, but this is the first time I've ever had to ask for help! Thanks in advance...

Layce
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Supposing your table starts in A1 try =INDEX($B$1:$G$1,MATCH(TRUE,INDEX($B$2:$F$6,MATCH(K1,$A$2:$A$6,0),)>=K2,0))
Formula to be committed with Ctrl+Shift+Enter
K1 contains the name and K2 the number ( adapt as needed)
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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