简体   繁体   English

将多个单元格的公式组合成一个单元格

[英]concatenate formula formation of multiple cells into one cell

I am trying to concatenate the text of multiple cells into one cells where there is blank cells too, for blank cells it is taking '0' which i want to be blank eg.,我试图将多个单元格的文本连接到一个也有空白单元格的单元格中,对于空白单元格,它采用我想要为空白的“0”,例如,

  • Cell 1 : Blank单元格 1:空白
  • Cell 2 : Blank单元格 2:空白
  • Cell 3 : A单元格 3:A
  • Cell 4 : B单元格 4 : B
  • Cell 5 : Blank单元格 5:空白
  • Cell 6 : C单元格 6:C
  • Cell 7 : Blank单元格 7:空白
  • Cell 8 : D单元格 8:D

answer should be ABCD without any zeros.答案应该是没有任何零的 ABCD。

You can use this approach if you have Excel 365:如果您有 Excel 365,则可以使用此方法:

=TEXTJOIN("",TRUE,A1:H1)

OR或者

{=TEXTJOIN("",TRUE,IF(ISTEXT(A1:H1),A1:H1,""))}

If do not have Excel 365 then:如果没有 Excel 365,则:

= CONCATENATE(
IF(COUNTBLANK(B1)=1,"",B1&CHAR(10)&","),
IF(COUNTBLANK(C1)=1,"",C1&CHAR(10)&","),
IF(COUNTBLANK(D1)=1,"",D1&CHAR(10)&","),
IF(COUNTBLANK(E1)=1,"",E1&CHAR(10)&","),
IF(COUNTBLANK(F1)=1,"",F1&CHAR(10)&","),
IF(COUNTBLANK(G1)=1,"",G1&CHAR(10)&","),
IF(COUNTBLANK(H1)=1,"",H1&CHAR(10)&","),
IF(COUNTBLANK(I1)=1,"",I1&CHAR(10)&","),
IF(COUNTBLANK(J1)=1,"",J1&CHAR(10))
)

在此处输入图片说明

With data in A1 through A8 , pick a cell and enter:使用A1A8 中的数据,选择一个单元格并输入:

=A1 & A2 & A3 & A4 & A5 & A6 & A7 & A8

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel:仅根据一个单元格的值或公式填充一系列单元格 - Excel: Fill a range of cells with a value or formula depending on only one cell VBA公式复制到多个单元格 - vba copy formula to multiple cells 在Excel的value_if_true字段中,我有一个串联公式。 它对于第一个单元格工作正常,但是当我将其拖动到其他单元格时会混乱 - In Excel in value_if_true field i have a concatenate formula. It works fine for first cell but messes up when i drag it to other cells Matlab:将所有单元格连接到一个矩阵 - Matlab: concatenate all cells to one matrix Google Sheets - 根据相应单元格范围内的数值连接单元格范围内文本的公式 - Google Sheets - Formula to Concatenate Text in Range of Cells based on Numeric Value in Corresponding Range of Cells 级联细胞 - Concatenate cells 使用带有 TEXTJOIN 的数组函数连接多个单元格,但具有多个条件? - Using an Array Function with TEXTJOIN to concatenate multiple cells, but with multiple criteria? 如何将多个ArrayList合并为一个? - How can I concatenate multiple ArrayLists into one? 在一个数组中连接多个numpy数组? - concatenate multiple numpy arrays in one array? 数组公式与 And() 连接的问题 - Issue with array formula concatenate with And()
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM