Hi,
I need help in formatting a data dump of survey results from a DB into a readable format.
Currently the data I have looks like this:
User1 Question1 Yes 3/15/2011 5:20:24 PM
User1 Question2 Female 3/15/2011 5:22:20 PM
User1 Question3 10-12 3/15/2011 5:24:24 PM
User1 Question4 I Like peanuts 3/15/2011 5:26:24 PM
User1 Question4 I like walnuts 3/15/2011 5:28:14 PM
User1 Question4 I like chestnuts 3/15/2011 5:29:12 PM
User2 Question1 No 3/15/2011 5:30:24 PM
User2 Question2 Male 3/15/2011 5:31:44 PM
User2 Question3 3-4 3/15/2011 5:31:44 PM
User2 Question4 I Like almonds 3/15/2011 5:32:22 PM
User2 Question4 I Like cashews 3/15/2011 5:33:12 PM
User3 Question1 Yes 3/15/2011 5:34:12 PM
User3 Question2 Male 3/15/2011 5:35:10 PM
User3 Question3 4-5 3/15/2011 5:37:11 PM
Some questions were multiple-choice and those questions could have as many as 30 choices to choose from.
Basically I need to take these results and display them in a format like this (Q=question):
USER Q1 Q2 Q3 Q4-1 Q4-2 Q4-3 Q5
User1 yes female 10-12 1 0 1 6
User2 yes male 3-4 0 1 0 7
User3 no male 4-5 0 0 0 9
So if Q4 had say 5 multi-choice answers, the top would be Q4-1, Q4-2, Q4-3, Q4-4, Q4-5
And if Q10 had say 10 multi-choice answers, the top would be Q10-1, Q10-2 and so forth.
For those columns that have multi-choice, need to detect which columns were picked and signify by a 1=yes 0=no for being chosen by that user (or 0 if the user left it blank for all columns)
The survey had 40 questions that could have been answered by those participating. The survey ended, if they were directed from one question, to skip over others if they didn't meet the criteria to go onto the next one.
I've tried pivot tables, and that helped, but the table only listed all the questions by the User down a column instead of across the top, which is what I'm looking to do.
Help greatly appreciated.
Bookmarks