Excel / Mail Merge - Return Column Headers for All and Any Columns with Values

eduams

New Member
Joined
Sep 26, 2016
Messages
1
Hi All

I am looking for a solution to the following problem:
I need to create a mail merge of all students with grades in subjects they study for only. If they study for those subjects then i want to return the subject and grade under each students name. If they don't study for any subject, then i don't want to see the subject listed at all...e.g.:
NameScience Term 1Science Term 2Science Term 3Science Term 4Maths Term 1Maths Term 2Maths Term 3Maths Term 4English Term 1English Term 2English Term 3
Jan6150081
Feb1817145
Mar72471844
Apr258199342989557492
May28288437501237252
Jun7993119086389
Jul3218737652454
Aug2267628466
Sep6164174559586580
Oct27349301114278
Nov
Dec
Sun55
Mon41
Tue56
Wed394883561875377157
Thu75875517445626215
Fri9994704214783753584
Sat3995957
Sun79568011
Mon174967370686433311588

<tbody>
</tbody>

..so the final outcome should be a single page with customized headers and merged fields like:

Name: Mar
Subjects:
Science Term 1: 72
Science Term 2: 47
Science Term 3: 18Maths Term 2: 44
_________________________________next student record

many thanks for your help
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top