Generate Multiple PDF Files using a cell value

VinodKrishnappa

New Member
Joined
Aug 6, 2016
Messages
31
Hi, I've situation like this.

In "Sheet1" I'll have data like below list.


[TABLE="class: cms_table, width: 527"]
<tbody>[TR]
[TD]Employee No
[/TD]
[TD]Name[/TD]
[TD]Category[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]12236[/TD]
[TD]ABCD[/TD]
[TD]Telephone[/TD]
[TD]$2100[/TD]
[/TR]
[TR]
[TD]12243[/TD]
[TD]EFGH[/TD]
[TD]Medical[/TD]
[TD]$4200[/TD]
[/TR]
[TR]
[TD]12256[/TD]
[TD]IJKL[/TD]
[TD]Telephone[/TD]
[TD]$1566[/TD]
[/TR]
</tbody>[/TABLE]



The above data should come in the following format in different .pdf file for each employee based on empployee no. wise.

[TABLE="class: cms_table, width: 221"]
<tbody>[TR]
[TD]Employee No.[/TD]
[TD]12243[/TD]
[/TR]
[TR]
[TD]Employee Name[/TD]
[TD]EFGH[/TD]
[/TR]
[TR]
[TD]Medical[/TD]
[TD]$4,200[/TD]
[/TR]
[TR]
[TD]Telephone[/TD]
[TD]$0[/TD]
[/TR]
[TR]
[TD]LTA[/TD]
[TD]%0[/TD]
[/TR]
[TR]
[TD]Total[/TD]
[TD]$4,200[/TD]
[/TR]
</tbody>[/TABLE]

Amount in Words Four Thousand Two Hundred


The data will be for more than 400 emp. i need to provide individual pdf to individual employee. Please help on this.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
It's doable. It just needs a few tricks. And I haven't time right now.

Are there FIXED categories? Ie, what piece of information provides the zero value for telephone and LTA above? Is there a row on Sheet1 with a value ZERO?
And if not, does every employee get to have a value reported?

What the question means is whether you need to de-normalise the data so there's one row per employee and one column per required item, or whether it's freeform.
 
Last edited:
Upvote 0
My method would be to create a new workBOOK, format the cells in that as you would like them to be presented in the PDF (including setting the print area)

Then run through your data top-to-bottom. At each employee:
Clear the data (not the formatting) with '.ClearContents'
Populate the data
Save-As PDF using something you know about the individual employee (maybe even using Employee-number and month to create the desired filename)​
Next
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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