A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Check multiple cells for a match



 
 
Thread Tools Display Modes
  #1  
Old May 7th, 2009, 08:03 AM posted to microsoft.public.excel.misc
Rusty
external usenet poster
 
Posts: 102
Default Check multiple cells for a match

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
  #2  
Old May 7th, 2009, 08:56 AM posted to microsoft.public.excel.misc
Stefi
external usenet poster
 
Posts: 1,841
Default Check multiple cells for a match

=IF(OR(B3=Sheet2!A2,B24=Sheet2!A2,B63=Sheet2!A2,B7 8=Sheet2!A2,B89=Sheet2!A2),"Yes","No")
Regards,
Stefi

„Rusty” ezt *rta:

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

  #3  
Old May 7th, 2009, 01:34 PM posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
 
Posts: 6,167
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


  #4  
Old May 8th, 2009, 02:40 AM posted to microsoft.public.excel.misc
Rusty
external usenet poster
 
Posts: 102
Default Check multiple cells for a match

Thanks Stefi and Don. I'll go with Stefi's as it was the first one I tried
and it is working great.

Thankyou

"Stefi" wrote:

=IF(OR(B3=Sheet2!A2,B24=Sheet2!A2,B63=Sheet2!A2,B7 8=Sheet2!A2,B89=Sheet2!A2),"Yes","No")
Regards,
Stefi

„Rusty” ezt *rta:

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

  #5  
Old May 15th, 2009, 06:57 AM posted to microsoft.public.excel.misc
Stefi
external usenet poster
 
Posts: 1,841
Default Check multiple cells for a match

You are welcome! Thanks for the feedback!
Stefi

„Rusty” ezt *rta:

Thanks Stefi and Don. I'll go with Stefi's as it was the first one I tried
and it is working great.

Thankyou

"Stefi" wrote:

=IF(OR(B3=Sheet2!A2,B24=Sheet2!A2,B63=Sheet2!A2,B7 8=Sheet2!A2,B89=Sheet2!A2),"Yes","No")
Regards,
Stefi

„Rusty” ezt *rta:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.