S
S
Sergey Lehmann2020-06-28 22:22:48
Google Sheets
Sergey Lehmann, 2020-06-28 22:22:48

How to merge rows and columns in Google Sheets?

Can you tell me by chance how to combine the columns?
Photo example. There are 8 columns. AH
The result is first A2-D2, the next line E2-H2.
Then everything is new, A3-D3, but if E3-H3 is empty, then it is skipped.
How to organize it all?
5ef8ee049476a104232269.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2020-06-29
@ProgrammerForever

Like this, in each cell the same formula:

=ЕСЛИ(ЕЧЁТН(СТРОКА());
  arrayformula(ДВССЫЛ("R"&((СТРОКА()-2)/2+1)&"C1:R"&((СТРОКА()-2)/2+1)&"C4";0));
  arrayformula(ДВССЫЛ("R"&((СТРОКА()-3)/2+1)&"C5:R"&((СТРОКА()-3)/2+1)&"C8";0))
)

Demo table
If the order is not important, you can make it a filter
=FILTER({A:D;E:H};{A:A;E:E}<>"")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question