Concatenate the values, based on the conditions matched

  • Hi All,


    VBA Code, Want to concatenate the values based on the conditions met,


    Input:
    A B
    1 1
    2 2
    3 2
    4 2
    5 3
    6 4
    7 4
    8 5


    in the above input, values in B2,B3,B4 and B6,B7 are same, so values in A3,A4 needs to concatenate with the value in A2.


    also values in A7 needs to concatenate with the value in A6.


    Once concatenated, rows needs to be deleted and please look below output for better understanding


    Output:
    A B
    1 1
    2,3,4 2
    5 3
    6,7 4
    8 5

  • Re: Concatenate the values, based on the conditions matched


    Hi All,


    i got the below code, its working fine:smile:


  • Re: Concatenate the values, based on the conditions matched


    Here's a little bit simpler solution:


    Matt Mickle
    Using Excel 2010,2013 & 2016

Participate now!

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