Create and Save PDF from Excel
Excel TO PDF Converter
by Syed Usman Ahmed
Business Analyst | Visiting Faculty | Passed CFA Level III | Excel & BI TrainerFollow
Business Analyst | Visiting Faculty | Passed CFA Level III | Excel & BI TrainerFollow
Description
This VBA macro enables you to create PDF files from the selected area and renames it as specified.
If you frequently work with Excel files, you might occasionally find yourself wanting to convert Range Charts or Pivot Tables to PDF selecting various cells/ranges (particularly non-contiguous ones) using the save as feature , perhaps to apply the same format to the resulting selection but this tool removes the unnecessary clicks.
This tool allows you to do that. :-)
Features Include
•Repeat Row Headers
•Save as Filename
•Fit All columns on one page
If necessary, you can move the active cell (without changing the selection) by using Tab (or Shift-Tab, in reverse). Take care not to inadvertently press any other keys, or you risk resetting the selection. Once the cursor is on the cell you want to de-select (i.e. it has become the Active cell), simply run the macro. Use Macro | Options to assign a shortcut key combination.
[There seems little point in dressing this code up in an .xls or .xlam file, so I've pasted it into a .docx file and you can just copy the text then paste it into your favourite place in your own VBA library (e.g. your Personal.xlb file). The VBA macro ‘Create_pdf’ will then be available to run.]
This VBA macro enables you to create PDF files from the selected area and renames it as specified.
If you frequently work with Excel files, you might occasionally find yourself wanting to convert Range Charts or Pivot Tables to PDF selecting various cells/ranges (particularly non-contiguous ones) using the save as feature , perhaps to apply the same format to the resulting selection but this tool removes the unnecessary clicks.
This tool allows you to do that. :-)
Features Include
•Repeat Row Headers
•Save as Filename
•Fit All columns on one page
If necessary, you can move the active cell (without changing the selection) by using Tab (or Shift-Tab, in reverse). Take care not to inadvertently press any other keys, or you risk resetting the selection. Once the cursor is on the cell you want to de-select (i.e. it has become the Active cell), simply run the macro. Use Macro | Options to assign a shortcut key combination.
[There seems little point in dressing this code up in an .xls or .xlam file, so I've pasted it into a .docx file and you can just copy the text then paste it into your favourite place in your own VBA library (e.g. your Personal.xlb file). The VBA macro ‘Create_pdf’ will then be available to run.]
This Best Practice includes
One MSWord document containing text of VBA macro
Further information
Create PDF files from Excel