This would be quite simple using the DATABASE field approach, for which all you need in addition to the worksheet sheet containing the answers is a sheet containing just the course IDs. Once it's configured that way, simply insert as many DATABASE fields as you have questions to report on. The basic DATABASE field would look something like:
{DATABASE \d "{FILENAME \p}/../Survey Data.xlsx" \s " SELECT [Question_1] FROM [Sheet1$] WHERE [Course_ID] = {MERGEFIELD Course_ID}" \l "15" \b "49" \h}
Since you haven't told us anything about the actual workbook & worksheet names, I'm unable to use those. The workbook name would replace 'Survey Data' and the worksheet name would replace 'Sheet1'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|