+ Reply to Thread
Results 1 to 6 of 6

Compare 2 Columns - Find Differences

  1. #1
    Registered User
    Join Date
    07-22-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    3

    Exclamation Compare 2 Columns - Find Differences

    I have data in 2 columns ("B" and "D") and I want to report off of the outliers. Column B has a name, "Michael" and Column D has a number.
    I want to be able to tell when a name has more than 1 color in the corresponding column. for eaxample:

    Michael 11002
    Michael 11002
    Michael 11173
    Carl 55689
    Carl 55689
    Dana 33749
    Dana 33529

    michael and Dana have disrepencies, so I want to highlight them. What is the best way to do this? I am well versed in Access VBA, but Excel, I am a bit lost. I do not want to have to do this via a pivot chart, perhaps an array? I am open to suggestions.

  2. #2
    Forum Contributor
    Join Date
    05-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    291

    Re: Compare 2 Columns - Find Differences

    Hi michaeljryan,

    you can use below formula in column E1 & drag it down

    =COUNTIF($B$1:$D$7,D1)

    you will get the count how many times name has appeared

    Thanks
    A

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Compare 2 Columns - Find Differences

    Or you could put:

    =IF(COUNT(IF($B$1:$B$100=B1,IF($D$1:$D$100<>D1,$D$1:$D$100)))<>0,"Discrepency","")

    down column E to flag each row that has a duplicate color.
    Last edited by daffodil11; 07-22-2013 at 05:26 PM. Reason: Absolute References

  4. #4
    Registered User
    Join Date
    07-22-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Compare 2 Columns - Find Differences

    Thank you for the suggestions, however this is not exactly what I need. Let me explain further:
    The names are listed with a correspoding number. Columns B and D, respectively. The names can be listed an inconsistant number of times, but I wat to check the first name\Number combo against other name\number combos where the name is the same as the previous row:

    Michael 11002 --this is okay
    Michael 11002--this is okay
    Michael 11173 Discrepency- name matches from previous row, but the number does not match first occurance of number for that name (11022)
    Carl 55689--this is okay
    Carl 55689--this is okay
    Dana 33749--this is okay
    Dana 33529--Discrepency- name matchesfrom previous row, but the number does not match first occurance of number for that name (11022)

  5. #5
    Registered User
    Join Date
    07-22-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Compare 2 Columns - Find Differences

    I found a solution!

    I first check for uniqueness of the name (1,0) then I check to see if the numer matches the previous.

    =IF(AND(IF(B2<>B1,1,0)=0,D2<>D1), "Outlier", "Match")

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Compare 2 Columns - Find Differences

    Assuming the data starts on row 2:

    =IF(B2=A1,IF(D2<>B1,"Discrepancy",""),"")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-12-2012, 05:43 AM
  2. Compare 2 columns to see differences
    By JE McGimpsey in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 07:05 AM
  3. Compare 2 columns to see differences
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  4. Compare 2 columns to see differences
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  5. [SOLVED] Compare two spreadsheets to find differences.
    By Toby in forum Excel General
    Replies: 2
    Last Post: 03-28-2005, 09:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1