Concatenate values based on criteria

后端 未结 2 1430
暖寄归人
暖寄归人 2020-12-12 04:44

I have a two column list of data in Excel. The first column being a question number from a test and the second column being a number referencing what is being tested on that

2条回答
  •  醉话见心
    2020-12-12 04:53

    Just to put my comment in an answer, so it make more sense.

    First sort columns A and B on Column B.

    In C2 put the formula:

    =IF(B2=B3,A2&","&C3,A2)
    

    Then copy down.

    Then in Column E place your unique reference list. And in D2 put:

    =VLOOKUP(E2,$B$2:$C$6,2,FALSE)
    

    And copy down.

    You can then hide column C.

    It does require that it be sorted correctly and a helper column but it does stay to the formulas only rule.

提交回复
热议问题