+ Reply to Thread
Results 1 to 9 of 9

How to match, merge and sum data

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    How to match, merge and sum data

    Hi all,

    Calling for someone who can help me here with VBA macro.

    I have data A1:D13 in Sheet1 where I want to match the data in Column A2:A13, then copy and sum the rest of the column to Sheet2 if they are matched, along with those which are not matched. Note that in column B, I want to 'merge' the string if data A is matched. Finally a status '1' or '0' if it has been changed. Please see the attached sample file.

    All help is much appreciated! Thank you very much!
    Attached Files Attached Files
    Last edited by owum; 06-19-2013 at 10:26 PM.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to match, merge and sum data

    try the macro included
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-18-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to match, merge and sum data

    Many thanks for the help! It works the way I want in my orig file, what about if I want to compare more than 2 dates? Should I modify the match function? Thanks again.

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to match, merge and sum data

    I was afraid you asked that...There would be more code to be added (for starters a loop to search each remaining record for more matches!!!)

  5. #5
    Registered User
    Join Date
    06-18-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to match, merge and sum data

    Thanks for the pointer, I will try to look into the loop. Can you or anyone point me to any posts with similar nature? Thanks again.

  6. #6
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to match, merge and sum data

    try it now, it should work for more than 2 matches
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-18-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to match, merge and sum data

    Thank you very much, sir. You did it elegantly!

  8. #8
    Registered User
    Join Date
    06-18-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to match, merge and sum data

    How do I make this post as [SOLVED]?

  9. #9
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to match, merge and sum data

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve

    if any questions arise look into the ? button to your rightmost boundary or the FAQ
    - Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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