merge duplicate columns

  • Hello!


    I'm having a time figuring out how to merge duplicate columns!
    I have a spreadsheet that's insanely large, there are duplicate column headers with differing data.


    What I'm trying to do is iterate through the column headers, find the duplicates, and merge all the duplicate columns leaving only 1 instance of the duplicate column with the unique row retained.
    there will always be at most 1 unique row value for the a column and the rest (groceries for example) are blank


    original


    id groceries supplies hardware groceries charms
    1 hammer pasta
    2 matches hammer


    desired result


    id groceries supplies hardware charms
    1 pasta hammer
    2 matches hammer


    thanks for your help in advance!


    EDIT - attached sample excel file as the way the inline example came out didn't look clear :)
    forum.ozgrid.com/index.php?attachment/63626/

  • Re: merge duplicate columns


    This should work

  • Re: merge duplicate columns


    Quote from jindon;735777

    This should work


    Perfect it seems to work! Thank you so much!!

  • Re: merge duplicate columns


    I was testing this and trying to tweaking this a bit, what if I wanted to only sort from the 6th column on (IE A:E is static data)?


    Is it in changing "i" and "ii"?


    many thanks!

  • Re: merge duplicate columns


    Observe the difference.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!