# 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

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

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

4. ## Re: Compare two ranges

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

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.

6. ## Re: Compare two ranges

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

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")

8. ## Re: Compare two ranges

Thank you. Works

9. ## Re: Compare two ranges

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

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1