如何把EXCEL中不同表格内容放到一个表格里,中间用逗号隔开?

2024-11-22 17:23:20
推荐回答(2个)
回答1:

在A1中输入或复制粘贴此公式
=IF(COUNTA(B1:F1)=1,B1,IF(COUNTA(B1:F1)=2,B1&","&C1,IF(COUNTA(B1:F1)=3,B1&","&C1&","&D1,IF(COUNTA(B1:F1)=4,B1&","&C1&","&D1&","&E1,B1&","&C1&","&D1&","&E1&","&F1))))
=IF(COUNTA(B1:F1)=1,B1,IF(COUNTA(B1:F1)=2,B1&","&C1,IF(COUNTA(B1:F1)=3,B1&","&C1&","&D1,IF(COUNTA(B1:F1)=4,B1&","&C1&","&D1&","&E1,B1&","&C1&","&D1&","&E1&","&F1))))
下拉填充

第一个公式分隔符号是半角逗号,第二个是全角逗号。

回答2:

A1:
=b1&","&c1&","&d1&","&e1&","&f1
下拉复制公式