Looking up a value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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
 
Back
Top