Lookup across multiple columns and row to produce a single result

Tomitsch

New Member
Joined
Jun 27, 2013
Messages
3
I am try to lookup Regions for each state in a vertical list. The problem is that the lookup table has several states in each reagion. So, in my lookup column I have OH (Ohio) I want to get the result region LRD or NE (Nebraska) = NWD, etc. Yes, I could destruct the table to make a linear list so each state has a matching value. But it seems I should be able to do this across a range of cells. I have tried all sorts of index/match, vlookups, hlookups etc.

I guess I cannot attach files at this time....being I am new on the site and all :ROFLMAO:

:ROFLMAO:
Lookup Table
RegionStates
LRDWVKYTNINOHMI
MVDMSILMNWILAIAND
NADCTMAMENHRIVTNJNYDCDEMDPAVA
NWDKSMONECOMTSDWYIDORWA
PODHIAKGuam
SADALFLGANCSCPRVI
SPDNMUTAZCANV
SWDAROKTX

<colgroup><col style="width: 48pt;" span="14" width="64"> <tbody>
</tbody>
 

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
Control+shift+enter, not just enter:

=IF(COUNTIF($B$3:$N$10,$A12),MIN(IF($B$3:$N$10=$A12,ROW($A$3:$A$10)-ROW($A$3)+1)),NA())

will return #N/A if A12 is not available in the value range.

I can't seem to get this portion to work, I would like the formula to return a blank cell if the lookup is not found. Do I need a combination of this formula along with the index listed above for this to work?
 
Upvote 0
I can't seem to get this portion to work, I would like the formula to return a blank cell if the lookup is not found. Do I need a combination of this formula along with the index listed above for this to work?

You need to confirm the formula with control+shift+enter, not just enter:

=IF(COUNTIF($B$3:$N$10,$A12),INDEX($A$3:$A$10,MIN(IF($B$3:$N$10=$A12,ROW($A$3:$A$10)-ROW($A$3)+1))),"")

This returns the row field instead of a row number and a blank upon failure.
 
Upvote 0
You need to confirm the formula with control+shift+enter, not just enter:

=IF(COUNTIF($B$3:$N$10,$A12),INDEX($A$3:$A$10,MIN(IF($B$3:$N$10=$A12,ROW($A$3:$A$10)-ROW($A$3)+1))),"")

This returns the row field instead of a row number and a blank upon failure.



It works! Great! Thank you much, I have been working on a solution for two weeks.
 
Upvote 0

Forum statistics

Threads
1,214,574
Messages
6,120,329
Members
448,956
Latest member
Adamsxl

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