Check cell value against cell range

C

Cees

I would like to do the following:

have a column of values(A8:A20) and I want to set a flag in the
neighbouring column( B8:B20) if the value in the cell (A8,A9.....A20)
is equal to one of the values in another range of cells (A1:F6)

I have been trying IF and OR functions, but it did not give me the
right results.

Any suggestions?

Thanks,

Cees
 
J

J.E. McGimpsey

One way:

B8: =COUNTIF($A$1:$F$6,A8)>0

which will return TRUE if the value in A8 is in A1:F6. Copy down to
B20.

If you want different result, you could use something like

=IF(COUNTIF($A$1:$F$6,A8)>0,"Present", "Absent")
 
P

Phil C

PS. I forget to say that the formula has to be entered as an array formula
(ctrl-shift-enter)

Phil
 

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

Top