Google sheet arrayformula join()和split()函数 [英] Google sheet arrayformula join() and split() functions

查看:392
本文介绍了Google sheet arrayformula join()和split()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何对这个 join 函数进行arrayformula吗?

我的公式不像这里的例子那么复杂。 ArrayFormula加入过滤器(Google Spreadsheets)



它不包含过滤器函数,所以我不确定那个答案是什么适用于并不适用。



我想为此公式组织这个: = if(isblank(B2),, join(, B2:I2))



使用常规方法排列某些内容不起作用:

= ArrayFormula(if(isblank(B2:b),, join(,,B2:b:I2:i)))



对于拆分,我还有 split(B2,,)


>解决方案

也许尝试:

  = ArrayFormula(if(len(B2:B), B2:B& C2:C& D2:D& E2:E& F2:F& G2:G& H2:H& I2:I))

  =数组公式(替换(转置(查询(转置(B2:I),,行(B2:B))),,))

或者,如果您想在连接值之间留出空格:

  = ArrayFormula (trim(转置(查询(转置(B2:I),,行(B2:B)))))

若要在arrayformula中使用split(),可以找到一种解决方法:此处


Does anybody know how to arrayformula this join function?

My formula is not as complex as the example here. ArrayFormula a Filter in a Join (Google Spreadsheets)

It does not contain a filter function, so I'm not sure what from that answer applies and doesn't apply.

I want to array formula this: =if(isblank(B2),,join("," ,B2:I2))

Using the normal way to array something doesn't work:

=ArrayFormula(if(isblank(B2:b),,join(",",B2:b:I2:i)))

Also for splits, I have split(B2, ",")

=ArrayFormula(split(B2:B,",")) does nothing but the first row

解决方案

Maybe try:

=ArrayFormula(if(len(B2:B), B2:B&C2:C&D2:D&E2:E&F2:F&G2:G&H2:H&I2:I,))

or

=ArrayFormula(substitute(transpose(query(transpose(B2:I),,rows(B2:B)))," ",""))

or, in case you want a space between the concatenated values:

=ArrayFormula(trim(transpose(query(transpose(B2:I),,rows(B2:B)))))

For using split() in arrayformula a workaround can be found here

这篇关于Google sheet arrayformula join()和split()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆