I have data in Google Sheets that I want to rearrange.
In each row, starting from the 4th column onwards, there are repeating column pairs of Favorite Fruit #& Favorite Color # where # indicates the index of the pair relative to other pairs. For example, Favorite Fruit 1 and Favorite Color 1 are followed by Favorite Fruit 2 and Favorite Color 2, etc.
- I would like to reorganize the data so that each column pair is in its row.
- The column pairs in all rows share the same two columns.
- The first three columns from the original row that contained a particular column pair are repeated on the new rows where that column pair is now located.
I can't figure out how to do it.
For example:
| Date | Class | Name | Fruit 1 | Color 1 | Fruit 2 | Color 2 |
|---|---|---|---|---|---|---|
| 2/27/2024 | Class 1 | Alice | Apple | Red | Grapes | Black |
Would become:
| Date | Class | Name | Fruit | Color |
|---|---|---|---|---|
| 2/27/2024 | Class 1 | Alice | Apple | Red |
| 2/27/2024 | Class 1 | Alice | Grapes | Black |

