+ Reply to Thread
Results 1 to 6 of 6

Need help to create a MACRO to compare two excel sheet and populate the data

  1. #1
    Registered User
    Join Date
    05-30-2013
    Location
    Chandigarh
    MS-Off Ver
    Excel 2010
    Posts
    4

    Need help to create a MACRO to compare two excel sheet and populate the data

    Hi,

    I need to create a MACRO for following tasks :
    Compare 3 to 4 Columns from one xls to other and IF these all matches then populate a other column value from one xls to another.

    In Sheet 1, I have below columns :

    Date Rule Item Var Status Comments

    In Sheet 2, I have below columns :

    Date1 Rules1 Item1 Var1 Status1 Comments1

    I want to compare first four columns from sheet 2 to sheet 1, IF Everything matches Then copy the content from 'status1' and 'comments1' column of Sheet 2 to 'Status' and 'Comments' column of Sheet 1.
    Please help.

  2. #2
    Registered User
    Join Date
    05-30-2013
    Location
    Chandigarh
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need help to create a MACRO to compare two excel sheet and populate the data

    Please help guys...Need it urgently!!!!

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need help to create a MACRO to compare two excel sheet and populate the data

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-30-2013
    Location
    Chandigarh
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need help to create a MACRO to compare two excel sheet and populate the data

    Thanks for your Help John!!!!

    It is good but I would like to tell you that these are two separate xls named as Sheet1 and Sheet2. These are not tabs on one sheet.
    Can you please help,If these are two separate xls ? Your help is very much appreciated.

    Regards
    Prashant

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need help to create a MACRO to compare two excel sheet and populate the data

    You're welcome. Try:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-30-2013
    Location
    Chandigarh
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need help to create a MACRO to compare two excel sheet and populate the data

    Hi John,

    There is one problem coming that While populating the values in Sheet 1 xls, Status and comments are populating correctly after matching the fields but Status column is already filled with some value.
    Status column has to be populated and it is happening but the only concern is "It is becoming blank for the row where the match dont find". It should not change the status to blank from any value, IF four column dont match.
    Thanks again!!!

+ 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. How to create a macro to populate selected required data on to a table ?
    By chon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2013, 03:59 AM
  2. [SOLVED] create new sheets and populate with data from original sheet
    By sommersc1 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-12-2013, 12:37 PM
  3. [SOLVED] Excel VBA: Dropdown box selection in first sheet to populate 2nd sheet from 3rd sheet data
    By EMLalan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-07-2012, 09:46 AM
  4. Replies: 5
    Last Post: 01-14-2012, 05:45 AM
  5. [SOLVED] How do I create a macro that will compare columns and place data
    By CompuCat in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-20-2006, 02:25 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