Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google sheet arrayformula join() and split() functions

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

like image 379
jason Avatar asked Apr 23 '14 06:04

jason


People also ask

What does Arrayformula do in Google Sheets?

Enables the display of values returned from an array formula into multiple rows and/or columns and the use of non-array functions with arrays.

What is the join function in Google Sheets?

Concatenates the elements of one or more one-dimensional arrays using a specified delimiter.

How do you split a function in Google Sheets?

Select the text or column, then click the Data menu and select Split text to columns... Google Sheets will open a small menu beside your text where you can select to split by comma, space, semicolon, period, or custom character. Select the delimiter your text uses, and Google Sheets will automatically split your text.


1 Answers

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

like image 197
JPV Avatar answered Oct 14 '22 06:10

JPV