+ Reply to Thread
Results 1 to 2 of 2

How do you combine duplicate data in excel with a macro or VBA?

  1. #1
    Registered User
    Join Date
    07-31-2011
    Location
    Sarasota, Florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    How do you combine duplicate data in excel with a macro or VBA?

    I have two columns of data in an excel spreadsheet as follows:


    Contractor ID # Order Total
    1521 120.00
    1522 120.00
    1523 30.00
    1524 30.00
    1523 0.00
    1521 30.00
    1522 30.00
    1526 30.00
    1527 30.00
    1528 30.00




    I want to perform a function that combines all the same ID #s with a total for their orders

    I envision the result would look like this:

    Contractor ID # Order Total
    1521 150.00
    1522 150.00
    1523 30.00
    1524 30.00
    1526 30.00
    1527 30.00
    1528 30.00






    I know that I can sort the columns from low to high. What tools do I use to automate combining the duplicate number in column 1 with their total related data in column 2?
    Last edited by LarryT; 07-31-2011 at 07:02 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,711

    Re: How do you combine duplicate data in excel with a macro or VBA?

    Have a look at this thread.

    It does something similar to what you want to do.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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