+ Reply to Thread
Results 1 to 8 of 8

Macro to combine Rows

  1. #1
    Registered User
    Join Date
    07-13-2007
    Posts
    50

    Macro to combine Rows

    Hello,

    I was hoping someone could provide me with a Macro to solve the following problem:

    I have a table which has employee names on the left handside. Next to them are contacts in a region.
    Please Login or Register  to view this content.
    What I need to do is to combine the data for the employees that have been duplicated and leave the non-duplicates as is. That means for example there should only be 1 row for Sarah and Doug with the values in the duplicate row added together.

    So when the macro is run the table should look like this:
    Please Login or Register  to view this content.
    I hope I have explained this clearly. All help is appreciated.

    Thanks
    Last edited by shg; 11-12-2008 at 04:15 PM.

  2. #2
    Registered User
    Join Date
    07-13-2007
    Posts
    50
    I guess I have not made clear what I need to do.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Why a macro?

    You could list the unique employee names in a column, and use SUMIF formulas to tote the contacts in each region.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    07-13-2007
    Posts
    50
    Quote Originally Posted by shg View Post
    Why a macro?

    You could list the unique employee names in a column, and use SUMIF formulas to tote the contacts in each region.
    How would I use the SUMIF formula to add up the number of contacts?

  5. #5
    Registered User
    Join Date
    07-13-2007
    Posts
    50
    I guess there must not be a macro for this. I still dont see how I can use the SUMIF function for this.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Please Login or Register  to view this content.
    The formula in B9 and copied down and across is =SUMIF($A$2:$A$7, $A9, B$2:B$7)

  7. #7
    Registered User
    Join Date
    07-13-2007
    Posts
    50
    THANKS SHG!!!!!!

    It looks like it worked!!!
    Last edited by shg; 11-12-2008 at 06:36 PM. Reason: deleted spurious quote

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Please mark thread as SOLVED?

+ 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