Lookup values

paul29berks

Active Member
Joined
Mar 15, 2004
Messages
293
I wondered if someone could help. I have forgotten the formula to look up values.

Basically I have 1 column that contains Codes (Shown as column 2 below)and I need to verify that these codes are valid against another column (Column 1 below) by doing a simply lookup. I wish to return the value True or false dependant on whether the code exists or not.

Can someone else.

Thanks

Paul

For example

Column 1 (valid codes) Column 2 Codes to check)

12345 11
1234 5
123 124
12
1
11
124
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Something like this:

Adjust ranges and copy down Column 3

=IF(ISNA(MATCH(B1,$A$1:$A$100,0)),"FALSE","TRUE")
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
20,222
Office Version
  1. 365
Platform
  1. Windows
Try...

C1, copied down:

=COUNTIF($A$1:$A$7,B1)>0

Hope this helps!
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
paul29berks said:
I wondered if someone could help. I have forgotten the formula to look up values.

Basically I have 1 column that contains Codes (Shown as column 2 below)and I need to verify that these codes are valid against another column (Column 1 below) by doing a simply lookup. I wish to return the value True or false dependant on whether the code exists or not.

Can someone else.

Thanks

Paul

For example

Column 1 (valid codes) Column 2 Codes to check)

12345 11
1234 5
123 124
12
1
11
124

Assuming that the valid list is in A2:A100 and the codes to check in B2:B4...

=ISNUMBER(MATCH(B2,$A$2:$A$100,0)+0

1 means valid, 0 invalid.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,987
Messages
5,834,718
Members
430,313
Latest member
smartykatwinks

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
Top