+ Reply to Thread
Results 1 to 5 of 5

Comparison of two lists,If find duplicates then return their specific values

  1. #1
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Comparison of two lists,If find duplicates then return their specific values

    I have two lists on Sheet"RawDataBher". 1st list is from column AL to column AO, 2nd List is from Column AR to Column AV.
    I need a VBA code, which should compare 1st list 1st two columns(i.e AL & AM) with 2nd list 1st two columns(i.e AR & AS).
    if it finds same data on both lists, it should paste them and their value present in column AT & AU at column AZ & BA, other wise it should return zero if first list data is not found at 2nd list.
    Attached is sample sheet
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Comparison of two lists,If find duplicates then return their specific values

    You can do it with a VLOOKUP formula.

    Copy the list AL:AM to AX:AY

    Put these formula in AZ3 and BA3 and copy down the list

    AZ3
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BA3
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or you could use the existing list in AL:AM and put the formulas in AP:AQ
    Last edited by AlphaFrog; 03-22-2020 at 07:07 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Comparison of two lists,If find duplicates then return their specific values

    Great and thank you dear... But i need to automate the process just on one click because this data is coming from other sheets and it is linked with main database, so i need a VBA code which should copy the two columns as you suggested and then perform the operation as you did by VLOOKUP. please help me with this

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Comparison of two lists,If find duplicates then return their specific values

    See if this can do

    Please Login or Register  to view this content.
    Kind regards
    Leo

  5. #5
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Comparison of two lists,If find duplicates then return their specific values

    Yes this is working great..thank you @LeoTaxi ....much appreciated

+ 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: 2
    Last Post: 03-25-2019, 11:27 AM
  2. Find duplicates and add them from 2 lists.
    By vtf096 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2018, 09:43 AM
  3. vba code to find duplicates in two lists
    By fruitloop44 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-18-2018, 10:03 AM
  4. [SOLVED] Formula or VBA - Comparison CSV Values between 3 cells for used range. Find unique values.
    By grphillips in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 06-09-2014, 02:12 PM
  5. [SOLVED] Lookup specific value in range of duplicates return if true
    By maddog9486 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-27-2013, 02:54 PM
  6. [SOLVED] Macro to find duplicates, concatenate Unique Values, then delete old duplicates
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2013, 04:32 PM
  7. [SOLVED] Cross Reference Lists to find Duplicates & List Line Item
    By mycon73 in forum Excel General
    Replies: 3
    Last Post: 01-01-2013, 07:42 PM

Tags for this Thread

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