?
Solved

Comparing excel data

Posted on 2014-10-10
7
Medium Priority
?
91 Views
Last Modified: 2014-10-17
Hi everyone,

I have an excel spreadsheet. Worksheets 1, 2 and 3 all contain data for Full name and email address in 2 separate columns.

Worksheet 1 contains all the data that is in Worksheets 2 and 3, as well as extra records that's not in either of those 2 other Worksheets.

Worksheet 2 contains a copy of some of the records (full rows) from Worksheet 1 (so this data is in both Worksheet 1 and 2 but not in Worksheet 3).

Worksheet 3 also contains a copy of some of the records from Worksheet 1 (so this data is in both Worksheets 1 and 3 but not in Worksheet 2).

In Worksheet 1, I need to find all those records that are in Worksheets 2 and 3 and somehow flag them. The end result would be that I could see all the unique records that are in Worksheet 1 only but not in Worksheets 2 and 3.

I thought about using something like vLookup with a nested if statement and a unique key. This is how I thought it could work:

1) Each of the 3 worksheets currently have data in columns A and B. In column C, I thought that I could concatenate cols A and B to create a unique key which would identify the record.
2) Then in column D of Worksheet 1, I could enter a vLookup function (together with a nested if statement), that would check column C in Worksheets 2 and 3 and compare them with each of the records in Column C in Worksheet 1. If it finds a match, then it could enter "Sheet 2" or "Sheet 3" in that column D which would tell me that those records are actually in those sheets. Then I could filter Worksheet 1 so that I can see the unique records.

As I don't really know how vLookup works, I'm not sure if this is the right way to go but if anyone thinks this is a possible solution, could I have some detailed instructions on how to get this to work?

Appreciate any help.
0
Comment
Question by:gwh2
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 26

Expert Comment

by:ProfessorJimJam
ID: 40374533
Do you want it with vba or formula?
0
 
LVL 1

Author Comment

by:gwh2
ID: 40374668
Thanks for the reply,

I'd rather have a formula if possible?
0
 
LVL 26

Accepted Solution

by:
ProfessorJimJam earned 2000 total points
ID: 40379465
please find attached workbook that has the solution of what you have requested.
EE.xlsx
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 33

Expert Comment

by:Rob Henson
ID: 40384813
Alternative without the need for Array formula:

=IF(NOT(ISERROR(MATCH($B2,Sheet2!$B:$B,0))),"Sheet 2",IF(NOT(ISERROR(MATCH($B2,Sheet3!$B:$B,0))),"Sheet 3","Sheet 1"))

Assumes that the e-mail address is already unique.

Thanks
Rob H
0
 
LVL 26

Expert Comment

by:ProfessorJimJam
ID: 40384916
It had to be in array formula because the author's request is not to match B column but both column A and B and hence array formula was provided
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40385195
I spotted the comment about joining the two fields together but couldn't see any examples in the sample that would require that.
0
 
LVL 1

Author Closing Comment

by:gwh2
ID: 40387483
Thanks very much - appreciate it
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

752 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