We have a database of questionnaire responses formatted to show each response on a different row, with the column headings being a different question. We have a separate worksheet which is being used as a display dashboard with a "Next" form control button which need to move to the next set if responses. E.G
What is your name? =Responses!A2
What is your favorite colour? =Responses!B2
What is your age? =Responses!C2
Etc
When the form control button is clicked we need the next set of results to appear E.G
What is your name? =Responses!A3
What is your favorite colour? =Responses!B3
What is your age? =Responses!C3
We have recorded what we would like to achieve via one click and the VB looks like this:
'
ActiveCell.FormulaR1C1 = "=Responses!R[-1]C[-3]"
Range("D12:H15").Select
ActiveCell.FormulaR1C1 = "=Responses!R[-9]C[-2]"
Range("D18:H21").Select
ActiveCell.FormulaR1C1 = "=Responses!R[-15]C[-1]"
Range("D24:H27").Select
ActiveCell.FormulaR1C1 = "=Responses!R[-21]C"
Range("D30:H33").Select
ActiveCell.FormulaR1C1 = "=Responses!R[-27]C"
Range("D36:H39").Select
ActiveCell.FormulaR1C1 = "=Responses!R[-33]C[2]"
Range("D42:H45").Select
ActiveCell.FormulaR1C1 = "=Responses!R[-39]C[3]"
Range("F48").Select
End Sub
This works and switches all the answers in their relevant cells to the answers in the next rows. However we need it to continue with each click and move down another row and so forth.
Does anyone know what is the correct VBA to achieve what we need?
Thanks!