I'm trying to concatenate rows of a matrix in a spreadsheet, which I've got from an importhtml call.
For example, if I have a 3x3 table:
A B C
D E F
G H I
I would like a command/function to convert it a row like so:
A B C D E F G H I
The idea is that each line will have a different html form which the same table/data is meant to be extracted. This cannot be done manually each time.
replace A1:C3 with your IMPORTHTML formula:
=SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(A1:C3),,999^99)),,999^99), " ")

if it contains words / spaces:
=ARRAYFORMULA(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
SUBSTITUTE(A1:C3, " ", CHAR(127))),,999^99)),,999^99), " "))

Nowadays, it's possible to convert a matrix to a line using the formula TOROW():
=TOROW(A1:C3)
The result will show the items in the following order
A1 A2 A3 B1 B2 B3 C1 C2 C3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With