简体   繁体   English

Excel公式获取一个单元格中的所有值

[英]Excel formula to get all values in one cell

I want to copy all cells with values into one cell from a specific column, with everytime a CHAR(13) included in between them.我想将所有带有值的单元格从特定列复制到一个单元格中,每次都在它们之间包含一个 CHAR(13) 。 This without VBA, just with excel formules.这没有 VBA,只有 excel 公式。

example:例子:

A   |   B
1   | test1
2   | test2
3   | 
4   | test4

I want the output in one cell like this:我想要这样的一个单元格中的输出:

=B1 & CHAR(13) & B2 & CHAR(13) & B4

When you add that value as a source to a textbox, you'll get:当您将该值作为源添加到文本框时,您将获得:

test1
test2 
test4

Anyone have any ideas?谁有想法? This without VBA, only via formula's没有VBA,只能通过公式

Consider:考虑:

=TEXTJOIN(CHAR(10),TRUE,B1:B4)

Note the use of 10 rather than 13 .请注意使用10而不是13

在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM