trebor97351
trebor97351

Reputation: 33

Google sheets arrayformula of arrays

I am trying to make an arrayformula in column B, which will copy whatever is in column A into C

A B C
aaa some (array)formula aaa (the contents of A1)
bbb bbb (the contents of A2)
ccc bbb (the contents of A3)

at the moment I can use this formula on individual cells in column B: ={"",A1}

However when I try to put this into an arrayformula: =arrayformula({"",A1:A10}) it just returns an error:

Function ARRAY_ROW parameter 2 has mismatched row size. Expected: 1. Actual: 9.

Is there any way to do this?

Upvotes: 1

Views: 239

Answers (4)

z..
z..

Reputation: 13156

Another solution:

=index(iferror(if({0/0,1},A:A)))

enter image description here

Or:

=query(A:A,"select 0/0, A label 0/0 ''")

enter image description here

Upvotes: 0

Tom Sharpe
Tom Sharpe

Reputation: 34420

Another one:

=ArrayFormula({if(A:A="",,),A:A})

enter image description here

Upvotes: 0

Mike Steelson
Mike Steelson

Reputation: 15328

Try

=arrayformula(if(A1:A="",,A1:A))

Upvotes: 0

MattKing
MattKing

Reputation: 7783

This is one way to do it. Note that you need to have FALSE or 0 for the 4th split parameter (as illustrated) for this to work.

=ARRAYFORMULA(SPLIT("|"&A1:A10,"|",0,0))

Upvotes: 2

Related Questions