+ Reply to Thread
Results 1 to 4 of 4

Formula/macro to match data between two columns

  1. #1
    Registered User
    Join Date
    09-20-2021
    Location
    Adelaide
    MS-Off Ver
    2016
    Posts
    2

    Formula/macro to match data between two columns

    Hi guys,

    I am new here. I am currently working on a project in the office where we need to do some audits. Part of that audit is to match id numbers between two columns and report.

    I have added an example worksheet. In the example worksheet what we need to do is match column A and column B. If anything that is present in column A does not present in column B we need to note that number in column C. If the number is present in column B however not in column A then we need to put it in column D.

    Currently we are doing this manually but i was thinking if there is any macro or formula i can use to automate the process so all we have to do is to enter the number in column A and B so that excel can auto calculate which number is present where and auto populate column C and D.

    Any help is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Formula/macro to match data between two columns

    Hi and welcome
    One method using a macro.
    Please Login or Register  to view this content.
    See attached.

    BSB
    Attached Files Attached Files
    Last edited by BadlySpelledBuoy; 09-20-2021 at 11:45 AM.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Formula/macro to match data between two columns

    You can use these formulae in the cells stated:

    C2: =IF(COUNTIF(B:B,A2)=0,A2,"")

    D2: =IF(COUNTIF(A:A,B2)=0,B2,"")

    Copy down as required. A number in either column indicates that it is not present in the other column, whereas a blank indicates that it is.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    09-20-2021
    Location
    Adelaide
    MS-Off Ver
    2016
    Posts
    2

    Re: Formula/macro to match data between two columns

    Thanks a lot guys. Will test it out thanks

+ 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. [SOLVED] Formula to match data in 2 or 3 columns
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-30-2019, 03:18 PM
  2. Replies: 2
    Last Post: 02-13-2016, 03:22 PM
  3. [SOLVED] Need help on formula to match data from different columns!
    By sideb in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-01-2015, 03:00 PM
  4. [SOLVED] Formula to match data in 2 columns and then algin the data in their rows.
    By billrogers184 in forum Excel General
    Replies: 2
    Last Post: 05-11-2015, 10:31 AM
  5. [SOLVED] Is a there a lookup formula I can use to match data from multiple columns of data?
    By missydanni in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2013, 08:27 AM
  6. [SOLVED] Macro to match data from 2 columns
    By Chris herbert in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 05:42 PM
  7. Macro formula to match two columns and Produce result in fourth column.
    By rishi1983 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2012, 08:50 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