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
Solved

Differences in two columns

Posted on 2016-08-25
9
61 Views
Last Modified: 2016-08-28
Hi All,

I need your assistance with excel.

I have two columns in Excel, Column A and Column B, both columns contain employee emails. The difference is that column A contains last year’s employee emails and column B contains the current list of employee emails.

Could you please help with me identifying the emails from column A not in column B. There are approx. 3000 rows .

Thank you in advance.
0
Comment
Question by:jose11au
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 11

Expert Comment

by:Missus Miss_Sellaneus
ID: 41771148
1. Sort the emails in column B, alphabetically.
2. Make sure column B is formatted as general, not text. Maybe A too.. can't recall which is important.

Lets assume for the example that the first row in column B w/ emails is row 2 and the last is row 200 in the following formula.
3. In C2, put =VLOOKUP(A2,B$2:B:$200,2,FALSE)
copy down through C200 (last row with values in A).

Now, for every cell in C greater than zero, the email in A has a match in B.
0
 
LVL 11

Assisted Solution

by:Missus Miss_Sellaneus
Missus Miss_Sellaneus earned 83 total points
ID: 41771149
If you want to sort the sheet based on the VLOOKUP results, first copy column C and paste/values. It won't work if you sort on anything other than B.
0
 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 83 total points
ID: 41771177
The VLOOKUP function that Missus Miss_Sellaneus is showing will either return an identical email if a value in A has a match in B -OR- it will return #N/A if there is no match.  

An alternative would be to use the COUNTIF function like so.  Beginning with data in row 2, add this formula in column C and copy down as far as the emails in column A:
C2:  =COUNTIF(B:B,A2)

if the email in cell A2 has a matching value (or values) in B, the number of matches will result; zero if no matches.

There should be no effect if you decide to resort your data by any of the columns.

Regards,
-Glenn
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 30

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 251 total points
ID: 41771196
If your intention is just to identify which email from col. A is not present in col. B, why not use conditional formatting on Col. A to identify those emails? So that you don't need to place any formula on the sheet.

In the attached, I have applied a conditional formatting on col. A to highlight any cell if it's content is not present in col. B. I have placed some numbers in both the columns to demonstrate how would it work.
You may replace them with actual emails.

The following formula is used for conditional formatting.
=AND(A1<>"",COUNTIF(B:B,A1)=0,ROW()>1)

Open in new window

To apply this conditional formatting to your own workbook follow these steps....
  • Select the whole column A.
  • Click on conditional formatting and choose New Rule.
  • Select "Use a formula to determine which cells to format".
  • In the formula box, type the formula given above. (or just copy the above formula and paste it in there)
  • Click on Format and set the format as per your requirement. You can set the fill color, font, border etc.
  • Click OK to finish.
For details, refer to the attached.
EETEST.xlsb
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 83 total points
ID: 41771358
If your intention is to create one list containing all relevant emails but with no duplicates. Copy and paste the lists into one column and then sort that column. Then use the duplicate wizard to remove duplicates.

Thanks
Rob
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 41771915
^^^This is what I love about Excel:  there is often more than one method available to provide a solution.  We have four good examples here (VLOOKUP, COUNTIF, Conditional Formatting, Remove Duplicates); we just need to see the context of the question and how the results need to be used.
1
 
LVL 30

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41772027
Well said Glenn! :)
0
 

Author Comment

by:jose11au
ID: 41773486
Thank you so much. All solutions are acceptable and work just fine. will split the points.
0
 
LVL 30

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41773495
You're welcome. Glad we could help.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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