# Compare two ranges

1. ## Compare two ranges

In K8:O100 there is a range of date

In R8:V100 there is a range of data

I need a formula in X8 that will look at R8:O8 and see if there is a row in K8:O100 that matches it. If yes that "Y". If no than "N"

Then I will put the same formula in X9 and look at R9:O9 and see if there is a row in K8:O100 that matches it. If yes that "Y". If no than "N"

and so on. I just need the first one and then I can drag it down the colums are equal if they match, meaning if it matches K8 will match R8 and L8 will match S8 and so on  Register To Reply

2. ## Re: Compare two ranges

I need a formula in X8 that will look at R8:O8 and see if there is a row in K8:O100 that matches it. If yes that "Y". If no than "N"
=IF(countif(\$K\$8:\$O\$100, R8 )>0, "Y", "N")
and copy down - now a Y will appear for each row

maybe i miss-understand exactly what you need because of this
Then I will put the same formula in X9 and look at R9:O9 and see if there is a row in K8:O100 that matches it. If yes that "Y". If no than "N"
perhaps a sample spreadsheet - with expected results also added - so we know how the data is laid out on what result you would like and why  Register To Reply

3. ## Re: Compare two ranges

Here is an example. Column X is where the formula will be. X8 for example, needs to look at each row in K:O to see if it matches R8:V8, if yes than "Y", if no than "N"

K L M N O P Q R S T U V W X

8 ABQ 5 James A 11 LAS 3 Sammy F 16 Y
9 SAV 7 KIle B 12 SAV 7 KIle B 13 N
10 HHH 8 Henry B 88 ABQ 5 James A 11 Y
11 LAX 10 Janice S 1 LAS 3 Sammy F 14 N
12 LAS 3 Sammy F 16 SEA 10 Matt D 95 N
13 BWI 1 Jimmy D 22
14 JAX 11 Paul T 14
15 ORD 8 Dexter Z 8  Register To Reply

4. ## Re: Compare two ranges

That didnt display the way I wrote it. Here is an attached example  Register To Reply

5. ## Re: Compare two ranges

this would be one way (added a concatenation in col P and col W). Then did a vlookup on those.  Register To Reply

6. ## Re: Compare two ranges

Yes, thank you. What about when it does match, right now it doesnt pull back "Y" in your attachment  Register To Reply

7. ## Re: Compare two ranges

using the rest, change the formula in col X (my version in col Y) to this...
=IF(ISNA(VLOOKUP(W5,P:P,1,FALSE)),"N","Y")  Register To Reply

8. ## Re: Compare two ranges

Thank you. Works  Register To Reply

9. ## Re: Compare two ranges

You're welcome, and thanks for the reputation bump.   Register To Reply