Looking up a value

B

Brooks W.

Ok, I just cant seem to find a way to do what I want.

I have a table that contains the first 3 digits of a large number of zip
codes similar to the following

16 103 199
17 104 200
18 105 202
19 106 203
20 107 204
21 108 205
22 109 207
23 110 208

This table is on a seperate tab. What I want to do is enter a value in a
cell and have the formula determine if the number is in the table. If it is I
need the cell to say "Yes" if not then say "No".

Am I missing something simple? Thanks for the help.
 
P

PCLIVE

One way:

=IF(COUNTIF(A1:C8,E1)>0,"Yes","No")

For a different sheet (Sheet2 - adjust as necessary):

=IF(COUNTIF(Sheet2!A1:C8,E1)>0,"Yes","No")

HTH,
Paul
 
B

Bernard Liengme

Suppose the table is on Sheet2 in the range A1:C8
Let A1 of another worksheet contain the value to be looked up
Then, on the same worksheet, the formula
=IF(COUNTIF(Sheet2!A1:C8,A1),"Yes","No") will serve your purpose.

BTW: the thing with columns/rows/cells is a SHEET or a WORKSHEET, the
do-hickey (technical term!) that you click to open a Worksheet is called a
TAB. Knowing the right name improves your chance of getting an answer when
using Help

best wishes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Worksheet Names using Macros 5
Lookup problem 4
SlNo. 3
How to match the same data 1
Source and Destination 1
Copy in order 3
Is there some kind of memory reference limit in excel? 4
Query 1

Top