Compare the data

anee_4285

New Member
Joined
Jul 9, 2015
Messages
27
Hello All,

I want to compare two data's. My A-D are main data, F-I are my ref data. I have to check is the reference data have the same value or not. If it dont have it then it should provide correct data.

If you see Stephen have the same Fruits in both Main and Ref data. Some thing should come up that its correct
Dave dont have the right fruit. some where it should show that its wrong and give the correct data. So that i can easly copy paste it. It has to tell only G6 and H6 are wrong and **, ** are correct



ABCDEFGHI
1Main DataMain DataMain DataMain DataRef dataRef dataRef dataRef data
2Name
Fruit 1

<tbody>
</tbody>
Fruit 2

<tbody>
</tbody>
Fruit 3

<tbody>
</tbody>
Name
Fruit 1

<tbody>
</tbody>
Fruit 2

<tbody>
</tbody>
Fruit 3

<tbody>
</tbody>
3
Stephen

<tbody>
</tbody>
Apple

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
John

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Apple

<tbody>
</tbody>
4
John

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Apple

<tbody>
</tbody>
Stephen

<tbody>
</tbody>
Apple

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
5
Dave

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
Apple

<tbody>
</tbody>
Trevor

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
Apple

<tbody>
</tbody>
6
Trevor

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Apple

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
Dave

<tbody>
</tbody>
Blueberry

<tbody>
</tbody>
Banana

<tbody>
</tbody>
Apple

<tbody>
</tbody>

<tbody>
</tbody>


Thanks in Advance.

Regards,
Anil
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try to paste it to J2

=IF(AND(NOT(INDIRECT("$B"&MATCH($F2,A:A,0))=$G2),NOT(INDIRECT("$C"&MATCH($F2,A:A,0))=$H2),NOT(INDIRECT("$D"&MATCH($F2,A:A,0))=$I2)),"G, H, I",IF(AND(NOT(INDIRECT("$B"&MATCH($F2,A:A,0))=$G2),NOT(INDIRECT("$C"&MATCH($F2,A:A,0))=$H2)),"G, H",IF(NOT(INDIRECT("$B"&MATCH($F2,A:A,0))=$G2),"G","NO PROBLEM")))
 
Last edited by a moderator:
Upvote 0
Hi ,

For 'Trevor' also it gave me 'No Problem', actually, my Main data and Ref is not matching for Trevor.
For Dave it gave me that G and H are wrong. Is there any way it paste the correct value in the next cell so that i can easly copy paste it.. I have around thousands of list. So if i get the difference. Still i have to do lot of manual work.

Thanks.
 
Upvote 0

Unknown
ABCDEFGHI
1Main DataCheck Data
2Correct data
3NameFruit 1Fruit 2Fruit 3CheckFruit 1Fruit 2Fruit 3
4StephenAppleBananaBlueberryTRUE 
5JohnBlueberryBananaAppleTRUE
6DaveBananaBlueberryAppleFALSEBlueberryBananaApple
7TrevorBananaAppleBlueberryFALSEBananaBlueberryApple
8
9Ref data
10NameFruit 1Fruit 2Fruit 3
11JohnBlueberryBananaApple
12StephenAppleBananaBlueberry
13TrevorBananaBlueberryApple
14DaveBlueberryBananaApple
15
16TRUE means it matches and False means it need correction
17
Sheet6
Cell Formulas
RangeFormula
F4=SUMPRODUCT(--(INDEX($B$11:$D$14,MATCH($A4,$A$11:$A$14,0),0)=$B4:$D4))=COUNTA($B4:$D4)
G4=IF($F4,"",INDEX(INDEX($B$11:$D$14,MATCH($A4,$A$11:$A$14,0),0),COLUMNS($G4:G4)))
 
Last edited:
Upvote 0
Unknown
ABCDEFGHI
1Main DataCheck Data
2Correct data
3NameFruit 1Fruit 2Fruit 3CheckFruit 1Fruit 2Fruit 3
4StephenAppleBananaBlueberryTRUE
5JohnBlueberryBananaAppleTRUE
6DaveBananaBlueberryAppleFALSEBlueberryBananaApple
7TrevorBananaAppleBlueberryFALSEBananaBlueberryApple
8
9Ref data
10NameFruit 1Fruit 2Fruit 3
11JohnBlueberryBananaApple
12StephenAppleBananaBlueberry
13TrevorBananaBlueberryApple
14DaveBlueberryBananaApple
15
16TRUE means it matches and False means it need correction
17

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet6

Worksheet Formulas
CellFormula
F4=SUMPRODUCT(--(INDEX($B$11:$D$14,MATCH($A4,$A$11:$A$14,0),0)=$B4:$D4))=COUNTA($B4:$D4)
G4=IF($F4,"",INDEX(INDEX($B$11:$D$14,MATCH($A4,$A$11:$A$14,0),0),COLUMNS($G4:G4)))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>


Thanks, but i have around 3000 names, so i cant have it at down. can i both the list sise to side or in different sheet
 
Upvote 0
Thanks, but i have around 3000 names, so i cant have it at down. can i both the list sise to side or in different sheet

Yes you can keep the reference range in different sheet. The benefit of the data setup I used is you can filter the false one to check those names that are not correct.
 
Upvote 0
Hi ,

For 'Trevor' also it gave me 'No Problem', actually, my Main data and Ref is not matching for Trevor.
For Dave it gave me that G and H are wrong. Is there any way it paste the correct value in the next cell so that i can easly copy paste it.. I have around thousands of list. So if i get the difference. Still i have to do lot of manual work.

Thanks.

OK then,
This will check the first column:
INDIRECT("$B"&MATCH($F2,A:A,0))=$G2

This will check the second:
INDIRECT("$C"&MATCH($F2,A:A,0))=$H2

And this will check the third:
INDIRECT("$D"&MATCH($F2,A:A,0))=$I2

Use them however you like...
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,394
Members
448,957
Latest member
Hat4Life

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