Short answer
- Add a new sheet.
- Add the following formulas to the new sheet
Cell A2 -> Headers
=OFFSET('Form responses 1'!$A$2,ceiling((row()-1)/5,1)-1,0)
This could be repeated several times, one for each header column, just change the last parameter accordingly.
Cell B2 -> data
=OFFSET('Form responses 1'!$A$2,ceiling((row()-1)/5,1)-1,mod(row()-2,5)*2+1,1,2)
Fill down as necessary
Explanation
OFFSET()
is used to get the values from the source data.
'Form responses 1'!$A$2
is the start point to count columns and rows.
row()
is used to increment the row and column iterators.
ceiling((row()-1)/5,1)
, row iterator, is used to set the row from the source data.
mod(row()-2,5)*2+1
, column iterator, is used to set the column from the source data.
- In the data formula the last parameter, indicates the number of data columns.
In case that are several "header data" columns, add 1 for each of them. I.E. if there are five "header data" columns, and six "data columns" the column iterator should be
mod(row()-2,5)*6+5
The final data formula to be added to the F2 cell is:
=OFFSET('Form responses 1'!$A$2,ceiling((row()-1)/5,1)-1,mod(row()-2,5)*6+5,1,6)
In the row and column iterators, 5 is used because there are 5 columns for "record data".
Demo
Spreadsheet
Short answer
From the question
After the user submits their choice on that page of the survey, I want
the next page to display text that refers to their choice.
This is not possible with the Google Apps Script Forms Service but could be done using other services.
Explanation
The Forms Service from Google Apps Script could be used to create, access, and modify Google Forms and to read and edit form responses but not to control the forms UI at run time. Url Fetch and Html service could be used to edit the control the forms UI at run time. For further details see this recent answer from me to a similar question.
Best Answer
one of these may serve: