+ Reply to Thread
Results 1 to 8 of 8

Compare three columns for duplicates

Hybrid View

Daniellowitz Compare three columns for... 04-08-2015, 09:35 AM
Special-K Re: Compare three columns for... 04-08-2015, 09:51 AM
Daniellowitz Re: Compare three columns for... 04-08-2015, 10:00 AM
azumi Re: Compare three columns for... 04-08-2015, 10:09 AM
Daniellowitz Re: Compare three columns for... 04-09-2015, 03:21 AM
Special-K Re: Compare three columns for... 04-08-2015, 10:07 AM
Daniellowitz Re: Compare three columns for... 04-09-2015, 04:07 AM
Daniellowitz Re: Compare three columns for... 04-09-2015, 08:17 AM
  1. #1
    Registered User
    Join Date
    04-08-2015
    Location
    Denmark
    MS-Off Ver
    mac Office 10
    Posts
    5

    Compare three columns for duplicates

    Hi experts

    I have spread sheet which has three columns, A,B,C. In each column there is an email for an user.

    I want to exclude users who are EITHER/OR in column A or Column B AND in column C.

    After that I need a count for the users who are left in column C.

    Tried different codes and scripts but cant get it to work properly.

    So if an email is present in column C and is also in A or B or both, I want them removed.

    Thanks in advance.

    Best regards

    Daniel

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: Compare three columns for duplicates

    Try

    in D1
    =IF(OR(NOT(ISNA(VLOOKUP(C1,A$1:A$1000,1,0))),NOT(ISNA(VLOOKUP(C1,B$1:B$1000,1,0)))),1,0)
    copy down column D

    Result of 1 indicates the valu of C is present in column A or B so
    just use autofilter for when column D is 0
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    04-08-2015
    Location
    Denmark
    MS-Off Ver
    mac Office 10
    Posts
    5

    Re: Compare three columns for duplicates

    Hi Special K

    Thanks but when I try to paste in the code I get an error

    The first C is highlighted as if there is some problems there.

    Im a neewbie to excel, so I need as much help as possible, thanks.

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Compare three columns for duplicates

    try to upload your sample workbook, click "Go Advanced" button and find pasperclip image button to attch your file

  5. #5
    Registered User
    Join Date
    04-08-2015
    Location
    Denmark
    MS-Off Ver
    mac Office 10
    Posts
    5

    Re: Compare three columns for duplicates

    Thanks. I just needed to change to semicolon. It works now :-)

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: Compare three columns for duplicates

    Copying into a blank spreadsheet what I've typed in my reply doesnt produce an error for me.
    Copy the formula in my reply and paste it in.

    Perhaps you need semi colons ; instead of commas , as you are in Denmark?

  7. #7
    Registered User
    Join Date
    04-08-2015
    Location
    Denmark
    MS-Off Ver
    mac Office 10
    Posts
    5

    Re: Compare three columns for duplicates

    Hi again

    I found out that I also need to check for duplicates if only two columns. Column A has 66.000 rows. I thought that this would work, but I get the result 1 on each of the cells

    =IF(OR(NOT(ISNA(VLOOKUP(B1;A$1:A$66000;1;0))));1;0)

    Thanks

    Daniel

  8. #8
    Registered User
    Join Date
    04-08-2015
    Location
    Denmark
    MS-Off Ver
    mac Office 10
    Posts
    5

    Re: Compare three columns for duplicates

    nevermind I found a solution.

    Thanks for replies.

+ 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. Compare 2 columns and remove duplicates in both columns when found
    By 1dtms in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2013, 02:19 AM
  2. Compare columns and delete duplicates
    By ephrahim in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2013, 03:38 PM
  3. [SOLVED] Macro to Compare Columns A & B and dispaly any duplicates in Columns C & D
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2013, 02:24 AM
  4. Compare data across 7 columns for duplicates
    By rstellers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2010, 09:19 AM
  5. Compare 2 columns and mark the duplicates
    By powpowninjastar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2010, 10: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