+ Reply to Thread
Results 1 to 6 of 6

Excel VBA - Compare Two worksheets and display the similarities in the 3rd sheet

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Excel VBA - Compare Two worksheets and display the similarities in the 3rd sheet

    Dear all,

    I have 2 Two worksheets which I need to compare and I would like to display the similarities in the 3rd sheet.

    Sheet1 has the following data:-

    No. Name
    1 Federrer
    3 Nadal
    4 Djokovic

    Sheet2 has the following data:-

    No. Name
    1 Federrer
    2 Murray
    3 Nadal


    Sheet 3 should have:-

    No. Name
    1 Federrer
    3 Nadal

    Kindly keep in mind that rows of data in either sheets can vary from time to time.

    Many thanks,
    Vinod Krishna
    Last edited by Vinod Krishna.C; 07-24-2013 at 09:36 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Excel VBA - Compare Two worksheets and display the similarities in the 3rd sheet

    As you are returning a single value, why can not you use Index and match formula?

  3. #3
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Excel VBA - Compare Two worksheets and display the similarities in the 3rd sheet

    Hello AB33,

    Thank you for your inputs.

    Wel, I actually have 4 columns with approx 3500+ rows of data.

    I would like to know what exactly you meant by " returning a single value"?

    It would be great if you can help me understand your solution with a smal example and VBA code for the same.

    Thanks in advance.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Excel VBA - Compare Two worksheets and display the similarities in the 3rd sheet

    If you want a VBA solution, please attach a sample excel book.

  5. #5
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Excel VBA - Compare Two worksheets and display the similarities in the 3rd sheet

    Sample data has been attached.

    I'm mostly looking for logic.

    Many Thanks,
    Vinod Krishna
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Excel VBA - Compare Two worksheets and display the similarities in the 3rd sheet

    Will try to come up with formula as well.
    Attached Files Attached Files

+ 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: 3
    Last Post: 12-15-2015, 05:04 PM
  2. VBA Code to Compare Two Worksheets and display the columns with changes.
    By mrbhide in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 12:33 AM
  3. Replies: 3
    Last Post: 10-12-2012, 12:02 AM
  4. Replies: 5
    Last Post: 06-21-2012, 11:58 AM
  5. Compare and Display Similarities/Differences in two lists.
    By mrgillus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2009, 02:50 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