Dynamic Table in Mail Merge with different page for key attribute

raushan316

New Member
Joined
Sep 26, 2019
Messages
1
I have to prepare letter for students of different colleges. For each college, there should be one letter with name of all the students & their details in tabular format.
The students data is in excel is as below:
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 100px"><col width="100"><col width="100"><col width="100"></colgroup><tbody>[TR]
[TD="bgcolor: #FFFF00"]College Name[/TD]
[TD="bgcolor: #FFFF00"]Student Name[/TD]
[TD="bgcolor: #FFFF00"]Fathers Name[/TD]
[TD="bgcolor: #FFFF00"]Address[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]XYZ[/TD]
[TD]PQR[/TD]
[TD]1, XYZ Street[/TD]
[/TR]
[TR]
[TD]PQR[/TD]
[TD]ASJ[/TD]
[TD]KDAJD[/TD]
[TD]2, XYZ Street[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]SDA[/TD]
[TD]DAD[/TD]
[TD]1, XYZ Street[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]ADA[/TD]
[TD]DADD[/TD]
[TD]1, XYZ Street[/TD]
[/TR]
[TR]
[TD]PQR[/TD]
[TD]RAR[/TD]
[TD]EWQD[/TD]
[TD]1, XYZ Street[/TD]
[/TR]
[TR]
[TD]PQR[/TD]
[TD]AWRWQR[/TD]
[TD]WRQR[/TD]
[TD]1, XYZ Street[/TD]
[/TR]
</tbody>[/TABLE]

What I want is, separate letter for different colleges i.e. in this case, 2 letters should be printed : one letter having details of all students in ABC College, and another letter having details of PQR College.
The number of students in each college is not fixed, so the table should be dynamic in nature.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

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