move cell values in Description from colums onto the same row based on a key

  • [TABLE="width: 246"]

    [tr]


    [TD="align: right"][/TD]

    [td][/td]


    [/tr]


    [tr]


    [TD="align: right"][/TD]

    [td]

    [TABLE="width: 500"]

    [tr]


    [td]

    Key

    [/td]


    [td]

    Description

    [/td]


    [/tr]


    [tr]


    [td]

    42

    [/td]


    [td]

    Pear

    [/td]


    [/tr]


    [tr]


    [td]

    46

    [/td]


    [td]

    Apple

    [/td]


    [/tr]


    [tr]


    [td]

    46

    [/td]


    [td]

    Orange

    [/td]


    [/tr]


    [tr]


    [td]

    50

    [/td]


    [td]

    Lime

    [/td]


    [/tr]


    [tr]


    [td]

    51

    [/td]


    [td]

    Lime

    [/td]


    [/tr]


    [tr]


    [td]

    51

    [/td]


    [td]

    Orange

    [/td]


    [/tr]


    [/TABLE]

    [/td]


    [/tr]


    [/TABLE]


    [TABLE="width: 500"]

    [tr]


    [td]

    Key

    [/td]


    [td]

    Description

    [/td]


    [/tr]


    [tr]


    [td]

    42

    [/td]


    [td]

    Pear

    [/td]


    [/tr]


    [tr]


    [td]

    46

    [/td]


    [td]

    Apple;Orange

    [/td]


    [/tr]


    [tr]


    [td]

    50

    [/td]


    [td]

    Lime

    [/td]


    [/tr]


    [tr]


    [td]

    51

    [/td]


    [td]

    Lime;Orange

    [/td]


    [/tr]


    [/TABLE]



    My file has 30,000 rows

  • Re: move cell values in Description from colums onto the same row based on a key


    Have you considered doing a Pivot Table of your data. It will accumulate your data as below:


    [table="class:thin_grid"]

    [tr][td]

    v

    [/td]


    [td="bgcolor:#ECF0F0, align:center"]A[/td]
    [td="bgcolor:#ECF0F0, align:center"]B[/td]
    [td="bgcolor:#ECF0F0, align:center"]C[/td]
    [td="bgcolor:#ECF0F0, align:center"]D[/td]

    [/tr][tr]

    [td="bgcolor:#ECF0F0, align:center"]1[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Key[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Description[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Row Labels[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]2[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]42[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Pear[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]42[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]3[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]46[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Apple[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]Pear[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]4[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]46[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Orange[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]46[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]5[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]50[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Lime[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]Apple[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]6[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]51[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Lime[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]Orange[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]7[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]51[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"]Orange[/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]50[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]8[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]Lime[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]9[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]51[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]10[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]Lime[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]11[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:LEFT"][COLOR="#000000"]Orange[/COLOR][/td]

    [/tr]


    [tr]

    [td="bgcolor:#ECF0F0, align:center"]12[/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]
    [td="bgcolor:#FFFFFF, align:CENTER"][COLOR="#000000"][/COLOR][/td]

    [/tr]


    [/table]

  • Re: move cell values in Description from colums onto the same row based on a key


    If you are open to a VBA solution, you may try something like this....
    In the attached, click the button "Transform Data" to run the code to get the desired output in col. D:E