Matching if cells in a given range match any value in another range

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
597
Office Version
  1. 365
I ned to know if any cells (excluding blanks) in H2 to J2 match any cells in R2 to T2 (again excluding blanks). If just one (or more) with a value match, I would like it to return "MATCH", or "NO MATCH" if not
H2 - PeterI2 - DaveJ2 - SteveR2 - AndrewS2 - PeterT2 - NathanU2 - MATCH
H3 - SophieI3 - J3 - R3 - EllieS3 - T3 - U3 - No Match
H4 - AndyI4 - SophieJ4 - R4 - AndyS4 - SophieT4 - DaveV3 - MATCH
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
How about
Excel Formula:
=IF(SUM(COUNTIFS(H2:J2,R2:T2)),"Match", "No match")
 
Upvote 0
How about
Excel Formula:
=IF(SUM(COUNTIFS(H2:J2,R2:T2)),"Match", "No match")
Hi Fluff, does that exclude blanks (I probably should have also mentioned that the "blanks" are a result of an INDEX-MATCH formula not finding a value so its returning a blank due to IFERROR being "")

Excel Formula:
=IFERROR(INDEX(Sheet1!$C$2:$C$11841,
MATCH(1,
((Sheet1!$D$2:$D$11841=$O2)*
(Sheet1!$G$2:$G$11841=R$1)*
(Sheet1!$N$2:$N$11841>=$Q2)*
(Sheet1!$M$2:$M$11841<=$Q2)),0)),"")
 
Upvote 0
In that case try
Excel Formula:
=IF(SUM(COUNTIFS(H2:J2,R2:T2,H2:J2,"?*")),"Match", "No match")
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,872
Messages
6,181,498
Members
453,047
Latest member
charlie_odd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top