Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

eXCEL COMPARISON SIMPLIFIED

Posted on 2012-03-19
2
Medium Priority
?
261 Views
Last Modified: 2012-03-19
I have two sheets

sheet1 has col1, col2, col3, col4

and

Sheet2 has col1, col2, col3, col4

The data in both the sheets is sorted as col2, col1

I want to run a comparison on two sheets, I want find the records missing in sheet2 that are present in sheet 1

We need to comapre col1

Example of data in sheet 1

col1, col2, col3, col4
a.b    d         1      1
d.c    d          2      1
E.F    D
w.s   e    
e.d    e           1     1


Example of sheet2
col1, col2, col3, col4
a.b    d         1      1
w.s   e    


FINAL SHEET1 SHOULD LOOK LIKE THIS
col1, col2, col3, col4  COL5
a.b    d         1      1
d.c    d          2      1     MISSING
E.F    d                         MISSING
w.s   e    
e.d    e           1     1    MISSING



pLEASE NOTE i AM NOW COMPARING ONLY cOL1 FROM SHEET1 TO COL1 FROM SHEET2
No idea how to do it in excel.
0
Comment
Question by:SMadhavi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 42

Expert Comment

by:dlmille
ID: 37739889
To compare the entire record from A:E - You can use an array function like this (in column e on sheet1, say E2):

[E2]=IF(ISERROR(MATCH($A2&$B2&$C2&$D2,Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100&Sheet2!$C$2:$C$100&Sheet2!$D2:$D100,0)),"MISSING","")

Hit CTRL-SHIFT-ENTER to confirm array.  Then, you can copy down.

And E2 on Sheet2:

[E2]=IF(ISERROR(MATCH($A2&$B2&$C2&$D2,Sheet1!$A$2:$A$100&Sheet1!$B$2:$B$100&Sheet1!$C$2:$C$100&Sheet1!$D$2:$D$100,0)),"MISSING","")

Hit CTRL-SHIFT-ENTER to confirm array.  Then, you can copy down.

The formula supports values from row 2 to 100.  Just change the 100 to a larger number if you're working with larger datasets, or use A:A, B:B, C:C, D:D for the entire sheet (though, that makes for additional processing cost).

See attached demonstrated solution.

Dave
excelComparison-r1.xls
0
 
LVL 42

Accepted Solution

by:
dlmille earned 2000 total points
ID: 37739893
If you only want to compare column A in both sheets, then

Sheet1:
[E2]=IF(ISERROR(MATCH($A2,Sheet2!$A$2:$A$100,0)),"MISSING","")

and copy down

Sheet2:
[E2]=IF(ISERROR(MATCH(A2,Sheet1!$A$2:A$100,0)),"MISSING","")

And copy down

See attached example using only the first column for matching.

Dave
excelCompFirstColOnly-r2.xls
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question