# Compare 2 sets of 3 columns

#### Blakowt

##### New Member
I am looking to compare 2 sets of 3 columns. Info would be something like this:

First set
Fslk AZ TA
KKsl AZ AT
ZLKK BA TA

Second set
KKsl AZ TA
Fslk AZ TA
ZLkk BQ TA

What I am trying to find are the instances that something in the second or third column has changed. The first column is the key and I'm and trying to figure out if the current 2nd and 3rd column has changed from a previous version. Also, I need the changes highlighted or in a different column.

Last edited:

### Excel Facts

Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

#### Dougie1

##### Board Regular
Use a VLOOKUP to pull the data from the second sheet into columns D & E of the first sheet.

Then compare column B with D by inserting in column F the function =IF(B1=D1,"No Change", "Changed") and fill down.

Then compare column C with E by inserting in column G the function =IF(C1=D1,"No Change", "Changed") and fill down.

By filtering on "Changed" in F or G - you will see where the data is different.

#### Yard

##### Well-known Member
Assuming 1st set of data in A1:C3, 2nd set of data in A5:C7

This in D5:

=IF(VLOOKUP(A5,\$A\$1:\$C\$3,2,0)=B5,"OK","2nd column changed")

This in E5:

=IF(VLOOKUP(A5,\$A\$1:\$C\$3,3,0)=C5,"OK","3rd column changed")

Then, Conditional formatting on D5 and E5 with the condition that:

Cell Value not equal to ="OK"

and format to whatever colour you like.

HTH

Replies
20
Views
611
Replies
3
Views
360
Replies
13
Views
394
Replies
2
Views
2K
Replies
0
Views
658

1,190,646
Messages
5,982,113
Members
439,755
Latest member
nicos18

### 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.

### Which adblocker are you using?

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

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