Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2005
    Posts
    153
    Thanks
    34
    Thanked 0 Times in 0 Posts

    Excel - Merging Rows query

    Is there a function where you can combine rows of data on an Excel worksheet based on the condition/rule of them sharing the same data in certain cells?

    eg
    I want to combine rows such as the below....

    1 TEST DATA Sep-09 UK
    2 TEST DATA Sep-09 UK
    1 NEW TEST NEW DATA Nov-09 US
    2 NEW TEST NEW DATA Nov-09 US

    so they look like this

    1 2 TEST DATA Sep-09 UK
    1 2 NEW TEST NEW DATA Nov-09 UK

    This is to be a a formula or a function I can write into a macro so I want it to be something like "combine rows where cells in column E contain shared data" for example.

    Thanks

  • #2
    New to the CF scene
    Join Date
    Sep 2009
    Location
    Panama
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are there always 2 rows that match ? Can there be single rows with no match ? Can there be 3 matching rows ?

    In your example, you appear to be moving all the cells to the right to make room for the contents of 'column A' from the matching row. How would this look for different numbers of matching rows ?

    In your example, you have matching data in other columns as well as column E. Is that relevant ? Would the following be classified as matching rows ?:
    1 TEST DATA Sep-09 UK
    2 DEV Datum AUG-09 UK
    If so, what would appear in columns B,C,D ?

  • #3
    Regular Coder
    Join Date
    Sep 2005
    Posts
    153
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Hi Everweb.
    Thanks for the reply.
    There aren't always two rows that match.
    I have actually now worked it out by having an IF statement in a new column for each row which looks to see if a cell matches the one below it. If it does then it adds a word/letter to the cell. Then I can filter the page and have unique records etc.
    So I've managed to do it with a mixture of formula and macro work.
    Thanks anyway


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •