Home > Blockchain >  Displace output from formula into another cell - Google Sheets
Displace output from formula into another cell - Google Sheets

Time:02-18

I would like the array result of a formula to be displaced/displayed somewhere else. In this instance it should appear down a row.

For this case, it can be done by padding out the first row of a wrap around array, but it's not very pretty and is not dynamic. (It must be ammended if the number of array columns changes.)

={"","","","";query(A1:D5)}

Is there a better more generic way to do this?

CodePudding user response:

try:

={INDEX(IFERROR(SEQUENCE(1, COLUMNS(A:D))/0)); QUERY(A1:D5)}

CodePudding user response:

You can do it with IFERROR(.../0) combined with SEQUENCE(), COLUMN() or ROW().

Something along the lines of

=arrayformula({iferror(sequence(1,columns(A1:D5))/0);query(A1:D5)})
  • Related