View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Check multiple cells for a match

Or a macro approach. Modify to suit

Sub checkcertaincells()
For Each i In Range("c4,c6,c10")
If i = Range("f7") Then mycount = mycount + 1
Next i
If mycount 0 Then MsgBox "There are " & mycount & " matches"
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Rusty" wrote in message
...
I am trying to create a formula that checks multiple specific cells and
then
returns a "YES" if it matches or a "NO" if it doesn't match any of the
cells.

example

I have two worksheets - 1 and 2
I want to search these cells only on worksheet 1- cells B3, B24, B63, B78,
B89 (But none of the cells in between such as B4, B35, etc) for a match
with
worksheet 2 cell A2.

Is this possible?

TIA.

Rusty