T
T
timur_khabibullin2021-07-28 12:45:03
Google Sheets
timur_khabibullin, 2021-07-28 12:45:03

How to use CONCATENATE and INDEX together?

Good afternoon! There is a form from which data goes to several "Class" columns, then a column is created with general data from the remaining columns, using "CONCATENATE". 6101257ac8e19513603030.png
But when filling out the form, a new row is created and the data disappears from the general column. Therefore, I created another sheet where I display everything that I need. Here I use INDEX and CONCATENATE, but it turns out to be displayed only this way, but it is necessary that the data go to each cell, except for D1: G1. Tell me please)610126d0e0b55579914210.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Ivanov, 2021-07-28
@timur_khabibullin

Maybe something like this will work for you

=ARRAYFORMULA(
  REGEXREPLACE(
    TRANSPOSE(QUERY(TRANSPOSE(D1:G&"|"),,COLUMNS(D1:G))),
    "(\|\s*)+",
    ", " )
)

6101389062e5c158977208.png
Specifically for your table, you can
={"В строку";ARRAYFORMULA(REGEXREPLACE(
  REGEXREPLACE(
    TRIM(TRANSPOSE(QUERY(TRANSPOSE(D2:G&"|");;COLUMNS(D2:G))));
    "(\|\s*)+";
    ", " );
  "(^,\s*)|(,\s*$)";
  ""
))}

61013f88495da801784284.png
See solution https://docs.google.com/spreadsheets/d/11YHMGv80tk...
See example https://docs.google.com/spreadsheets/d/1a1MZ_kik2h...
Formula description https://oshliaer .github.io/qna?target=post/google-...

M
Max_63rus, 2021-08-25
@Max_63rus

There is a way to chain multiple columns into 1 line by line: =ARRAYFORMULA({C1:C10}&{D1:D10}&{E1:E10}&{F1:F10}&{G1:G10})
6125e916c54a3195790265.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question