将标题值和/或分隔线连接到Google表中订购值的变量(1B)
在此共享中按指定顺序进行了联系,如何在指定2个变量时维护指定的订单: a)何时将“标题值”和“单元格值”组合到标题/值对,以及 b)当添加定界符时,
显示标头/值对以以下等式显示:
=ARRAYFORMULA(TRIM(SUBSTITUTE(TRIM(FLATTEN(QUERY(REGEXREPLACE(SORT(TRANSPOSE(
IF((A2:D4<>"")*(REGEXMATCH(A1:D1, "^\d+_")), "♥"&A1:D1&" "&A2:D4, )),
FLATTEN(A1:D1), 1), "\d+_", ),,9^9))), "♥", CHAR(10)))
所有带有上一个数字的标头值都按顺序显示在上图中。
目标 但是,如下图所示,有时不
- 包括标头值
- 添加一个或多个可变分配器(即
char(10),“,”
之后字符串和其他时间有助于
可能的方法:
在上面的图像中,数字 + undercore ex
1_name
( b1)可以代表一个参数,包括标题/值对和数字 + tilda4〜MATH
(A1)可以代表一个参数,以排除标题值零或更多可划分器变量(&gt; 1由
>&amp;
表示),可以在管道后指定定界器以包含结果字符串, (值或标题/变量对)
因为上述方程式,我相信,我相信在管道后指定值以表示可分配者变量是有意义的。如下图所示,此参数将插入该空间中的公式。
例如,在B1中,管道char(10)&amp; char(10)
会添加两个线路。在A1中,管道“”,
之后的值只需添加一个没有新线路空间的逗号。
共享的表为
In this shared Google Sheet there are values in a range, contactenated in a specified order, how can I maintain the specified order while specifying 2 variables:
A) when to combine the "header value" and "cell value" into a header/value pair and
B) when to add a delimiter
A header/value pair are displayed with the following equation:
=ARRAYFORMULA(TRIM(SUBSTITUTE(TRIM(FLATTEN(QUERY(REGEXREPLACE(SORT(TRANSPOSE(
IF((A2:D4<>"")*(REGEXMATCH(A1:D1, "^\d+_")), "♥"&A1:D1&" "&A2:D4, )),
FLATTEN(A1:D1), 1), "\d+_", ),,9^9))), "♥", CHAR(10)))
All header values with a preceding number are displayed in order in the above image.
Goals
However, as in the following image, there are times when it would be useful to
- Not to include the header value
- add one or more variable delimeters (ie
CHAR(10), " , "
after the cell value string and other times when it would help to
Possible approach:
In the above image, a number + an underscore ex
1_Name
(B1 )can represent a parameter to include the header/value pair and a number + tilda4~Math
(A1) can represent a parameter to exclude the header valueZero or more delimeter variables (>1 represented by
&
)can be provided after a pipe to designate the delimiters to include afer the resulting string (value or header/variable pair)
Since the above equation, already adds a CHAR(10)
delimiter I believe it would make sense to specify values after a pipe to represent a delimeter variable. As in the image below, this parameter would be inserted into the formula in that space.
For example, in B1 the value after the pipe CHAR(10) & CHAR(10)
would add two line spaces. In A1, the value after the pipe ", "
would simply add a comma without a new line space.
The shared sheet is here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
管道
|
之后的第1行中的内容只能作为纯文本访问而不是公式输入。因此,最好没有双引号的,
逗号,而不是char(10)&amp; char(10)
使用唯一的符号两次,例如♦♦
:请参阅图像以获取黄色突出显示的建议更改:
stuff in your row 1 after pipe
|
can be accessed only as plain text and not as formula input. therefore it's better to have,
commas without double-quotes and instead ofCHAR(10) & CHAR(10)
use a unique symbol twice like♦♦
:see the image for recommended changes highlighted by yellow: