仅当B值不是空白时,如何将条件添加到阵列中的condenate列A& b?

发布于 2025-01-17 18:52:41 字数 505 浏览 3 评论 0原文

尝试显示列的输出A& b当单元格中存在B中的值时。

我可以通过使用TextJoin,将过滤器&组合来加入B列中的所有非空白值。一个数组,我可以分两个步骤获得输出。

但是我想知道是否有一个步骤可以做到这一点,例如组合数组&过滤功能还是其他方式?


我认为也许可以通过替换任何没有答案的“主题”来实现。可能使用正则替换。

Trying to display output of columns A & B when value in column B is present in a single cell.

I can join all of the non blank value in column B by using textjoin, combining a filter & an array I can get the output in two steps.

But I am wondering if there is a way to do this in one step such as combining the array & filter function or in some other way?

enter image description here

here is a link to spreadsheet.


I think maybe this can be accomplished by substituting any of the "subjects" that are not followed by an answer. Possibly using a Regex replace.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不疑不惑不回忆 2025-01-24 18:52:41

使用:

=TEXTJOIN(CHAR(10), 1, FLATTEN(QUERY(TRANSPOSE(FILTER(A:B, B:B<>"")),,9^9)))

或:

=TRIM(JOIN(, FILTER(A:A&" "&B:B&CHAR(10), B:B<>"")))


=INDEX(TRIM(SUBSTITUTE(FLATTEN(QUERY(TRANSPOSE(
 IF(A2:E6="",,"♦"&A1:E1&" "&A2:E6)),,9^9)), "♦", CHAR(10))))

​=“ https://i.sstatic.net/artob.png” alt =“在此处输入图像说明”>

use:

=TEXTJOIN(CHAR(10), 1, FLATTEN(QUERY(TRANSPOSE(FILTER(A:B, B:B<>"")),,9^9)))

enter image description here

or:

=TRIM(JOIN(, FILTER(A:A&" "&B:B&CHAR(10), B:B<>"")))

enter image description here


update

=INDEX(TRIM(SUBSTITUTE(FLATTEN(QUERY(TRANSPOSE(
 IF(A2:E6="",,"♦"&A1:E1&" "&A2:E6)),,9^9)), "♦", CHAR(10))))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文