# Lookup values

#### paul29berks

##### Active Member
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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Something like this:

Adjust ranges and copy down Column 3

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

Try...

C1, copied down:

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

Hope this helps!

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.

Replies
3
Views
112
Replies
6
Views
222
Replies
18
Views
870
Replies
1
Views
109
Replies
3
Views
115

1,212,055
Messages
6,105,643
Members
447,974
Latest member
misspancake

### 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.

### Which adblocker are you using?

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

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