Assuming you are on Excel 365 and have use of FILTER() and TEXTJOIN(), you can enter the following formula into column D and drag down:
=IF(COUNTIF($A$1:A1,A1)=1,TEXTJOIN(":",TRUE,FILTER($B$1:$C$15,$A$1:$A$15=A1)),"")
This checks if the value in column A is the first occurrence of that value. If it is, it will output a colon delimited string of every value in columns B:C where col A equals the current value in column A.
you can use if command
if cellA1<>cellA2 then you concatenate b2 and C2 else you concatenate D2 and B2, and C2.
You can use a helper column to do this but you need to have a header row for this to work. Assuming your first row of data is in A2, B2, C2:
paste this into D2:
=IF(A2=A1,D1&","""&B2&""":"""&C2&"""",""""&B2&""":"""&C2&"""")
and paste this into E2:
=IF(A2=A3,"",D2)
Copy these two down to every row in the data.
Note: This version puts the concatenated result in D at the last row of the group instead of at the first row of the group like your screenshot shows.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.