Reputation: 81
I have a sheet with this:
I'm trying to collect these names in a different Sheet so it can load an API but that API loads 10 lines so between each name I need a 10 line space, leaving it like this:
Right now if I copy and paste A1
(Which formula is: Sheet6!A2
) in A21
it will appear as Sheet6!A22
instead of Sheet6!A4
.
I've done this manually but I have hundreds of these so I'd like a way to get these cell references just by dragging, copy-paste or any other faster way.
Upvotes: 1
Views: 130
Reputation: 1
you could do:
=ARRAYFORMULA(SPLIT(TRANSPOSE(SPLIT(QUERY({
"♦"&INDIRECT("A2:A"&COUNTA(A1:A))&"♠Sheet6!A"&
ROW(INDIRECT("A2:A"&COUNTA(A1:A)))&"♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦"},,999^99), "♦")), "♠"))
if you just want to add 9 empty rows between names do:
=ARRAYFORMULA(TRANSPOSE(SPLIT(QUERY({
"♦"&INDIRECT("A2:A"&COUNTA(A1:A))&"♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦"},,999^99), "♦")))
or like this:
=ARRAYFORMULA(TRANSPOSE(SUBSTITUTE(SPLIT("♦"&TEXTJOIN(REPT("♠♦", 10), 1, A2:A), "♦"), "♠", )))
Upvotes: 1