#Short answer Formula using the Google Sheets array handling feature:
=Filter(
{{C5:C7,D5:D7,E5:E7};{C5:C7,D5:D7,F5:F7};{C5:C7,D5:D7,G5:G7}},
Len({{E5:E7};{F5:F7};{G5:G7}})>0
)
#Long answer The question is about normalizing cross-tabbed data. There are a lot of posts about this topic. The basic keywords that could help to find them are
- spreadsheet
- normalize
- cross-tab
Several of the results will be based in a programming language. Others could use "complicated" formulas that could be necessary in complex situations, but in the linked demo spreadsheet, the data is in C5:G7. C5:D7 are the row headings, and E5:G7 are the cross-tabbed data. This could be handle by using a simple solution based on Google Sheets arrays
arrays and could be easily adapted to normalize a range with any number of rows and few additional columns.
Google Sheets can handle arrays by enclosing values between curly brackets. Some people call them embedded arrays. This feature could be used to easily normalize simple cross-tabbed data
#References