[英]Concatenate column A data into column C using column B data
This needs 3 columns:这需要 3 列:
Into column C, type:在 C 列中,键入:
=COUNTIF($B10:$B$10,">0")
at the bottom of the column, and drag upwards.在塔的底部,和向上拖动。 This counts the numbers in the range, and assigns each subrange a value.
这会计算范围内的数字,并为每个子范围分配一个值。
Into column D, type:在 D 列中,键入:
=IF(C2<>C1,A2,CONCAT(D1," ",A2))
at the top of the column, and drag down.在列的顶部,然后向下拖动。 This concatenates each subrange.
这将连接每个子范围。
Finally, into column E, type:最后,在 E 列中键入:
=IF(B2="","",D2)
at the top of the column, and drag down.在列的顶部,然后向下拖动。 This only shows the results we want.
这仅显示了我们想要的结果。
Also, make sure there is a header or blank line at the start of the data.此外,请确保数据开头有标题或空行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.