Need help with a formula to look up 2 values in table

freeb1893

Board Regular
Joined
Jul 30, 2012
Messages
233
Office Version
  1. 365
Platform
  1. Windows
Alright I have 2 columns of data that I want to process and check against the following table:
AK
AL
AR
AZ
CA
CO
CT
DE
FL
GA
HI
IA
ID
IL
IN
KS
KY
LA
MA
MD
ME
MI
MN
MO
MS
MT
NC
ND
NE
NH
NJ
NM
NV
NY
OH
OK
OR
PA
RI
SC
SD
TN
TX
UT
VA
VT
WA
WI
WV
WY
DC
FL
LA
CA
NV
KS
MA
MD
GA
NC
MN
MT
IA
KY
MO
MO
MS
NH
PA
NH
OH
ND
NE
TN
ND
SC
SD
SD
VT
NY
OK
OR
PA
PA
TX
WA
WV
CT
GA
WY
VA
AR
WY
WV
MA
ID
IA
KY
CO
MD
GA
MO
CO
OR
NE
NY
NJ
AL
SC
MO
NV
IN
MI
NE
OH
TX
NY
VA
WI
SD
OK
AL
SD
TN
MN
WY
MA
PA
TX
UT
VT
WV
AR
CA
DE
MA
NC
IA
AL
LA
AZ
DC
NH
OR
IL
MD
ID
VA
MS
MS
NM
AZ
NM
RI
PA
TN
NE
OR
KY
OH
OK
TN
AR
RI
WV
IN
WI
TN
AR
WY
VA
MT
CO
ME
DE
UT
AZ
CT
IN
CO
ID
MD
MN
AR
NM
CO
KY
NY
MI
OH
MT
TN
OK
NV
OK
AL
SD
UT
MO
IL
CO
VA
VT
DC
IA
AR
LA
ID
GA
IA
AZ
CA
MA
KY
KS
NV
NJ
MT
GA
OK
ID
MD
MN
PA
NE
TN
UT
UT
FL
WI
WA
WI
WV
CT
DE
IA
KS
CO
ID
NJ
MI
MO
NY
ND
KY
NM
NC
VA
SD
TX
WY
IL
WY
IL
IL
MO
NM
OH
NE
MO
NV
TN
UT
AZ
IN
KS
MS
KY
NC

<tbody>
</tbody>


Basically in another table I have the following:
Column 1
Column 2
MD
PA
VA
PA
TX
PA

<tbody>
</tbody>

What I want to do is lookup the value in Column 1 on my 2nd table, "MD", and check the 1st table above to see if that value is found under the column that has the header of my corresponding value in Column 2 of my 2nd table, "PA", and return a TRUE or FALSE if MD is found under the "PA" column in my above table.

Can anyone help me put that into a formula?

Examples with the above 2nd table, the results of the formula for the 3 rows of data would be True, True, and False.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Select the area the upper table occupies including the headers and name the selection as Table via the Name Box.

Let A2 house MD and B2 PA.

In C2 enter and copy down:

=ISNUMBER(MATCH($A2,INDEX(Table,0,MATCH($B2,INDEX(Table,1,0),0)),0))
 
Upvote 0

Forum statistics

Threads
1,214,639
Messages
6,120,679
Members
448,977
Latest member
dbonilla0331

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