TC76
TC76

Reputation: 870

Split Google Sheets Query results from one row into two

I want to take my QUERY results and move one cell (H [description]) to the following row of each result.

I found this answer, which is very close, but the format of the table is different, so I'm not sure how to apply it to my scenario.

This is the basic idea:

    Category | Sub-Category | Item       | Description
    Fruit    | Citrus       | Orange     | It's orange
    Fruit    | Melon        | Cantaloupe | Round

Into

    Category | Sub-Category | Item  
    Fruit    | Citrus       | Orange     
    It's orange
    Fruit    | Melon        | Cantaloupe 
    Round

Upvotes: 2

Views: 1061

Answers (1)

player0
player0

Reputation: 1

=ARRAYFORMULA(QUERY(SUBSTITUTE(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(
 QUERY(TRANSPOSE(IF(IFERROR(SPLIT(C1:C, ";"))<>"", "♥"&A1:A&"♦"&B1:B&"♦"&
 IFERROR(SPLIT(C1:C, ";"))&"♥"&D1:D, )),,999^99)),,999^99), "♥")), "♦")), D1, ), 
 "where Col1 is not null", 0))

0


=ARRAYFORMULA(QUERY(SUBSTITUTE(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(
 QUERY(TRANSPOSE(IF(C1:C<>"", "♥"&A1:A&"♦"&B1:B&"♦"&C1:C&"♥ ♦"&D1:D, ))
 ,,999^99)),,999^99), "♥")), "♦")), D1, ), 
 "where Col2 is not Null", 0))

0

Upvotes: 1

Related Questions