megnin
Active Member
- Joined
- Feb 27, 2002
- Messages
- 340
I have a report that gets its data from a large MS SQL table of questionaire results.
The columns of the table are, say: QuestionID, QuestionText, Part01, Part02, ReviewerName.
Part01 can be "Yes" or "No", Part02 can be "Yes" or "No" and so on for each Question.
ReviewerName is a person's last name.
The report shows the count of "Yes" answers and "No" answers for each Part of each Question and may look like:
Question | P01_Yes | P01_No | P02_Yes | P02_No | ReviewerName | Etc...
Q1 | 95 | 5 | 96 | 4 | Jones |
Q2 | 94 | 6 | 98 | 2 | Smith |
An example of the query for just one cell may be:
SELECT COUNT(1)
FROM MyTable
WHERE (Part01='Yes') AND (ReviewerName='Jones')
Let's say that one returns the "95" Yeses above. The next one to return the "5" Nos may be:
SELECT COUNT(1)
FROM MyTable
WHERE (Part01='No') AND (ReviewerName='Jones')
How would I do that using Excel 2007 (worksheets must run on Excel 2003 though)?
Thanks in advance.
The columns of the table are, say: QuestionID, QuestionText, Part01, Part02, ReviewerName.
Part01 can be "Yes" or "No", Part02 can be "Yes" or "No" and so on for each Question.
ReviewerName is a person's last name.
The report shows the count of "Yes" answers and "No" answers for each Part of each Question and may look like:
Question | P01_Yes | P01_No | P02_Yes | P02_No | ReviewerName | Etc...
Q1 | 95 | 5 | 96 | 4 | Jones |
Q2 | 94 | 6 | 98 | 2 | Smith |
An example of the query for just one cell may be:
SELECT COUNT(1)
FROM MyTable
WHERE (Part01='Yes') AND (ReviewerName='Jones')
Let's say that one returns the "95" Yeses above. The next one to return the "5" Nos may be:
SELECT COUNT(1)
FROM MyTable
WHERE (Part01='No') AND (ReviewerName='Jones')
How would I do that using Excel 2007 (worksheets must run on Excel 2003 though)?
Thanks in advance.