Written by Allen Wyatt (last updated July 27, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365
Lissa has a workbook that contains multiple worksheets. She would like to create individual PDFs for these worksheets (one PDF per worksheet) with the name of the PDF based on the worksheet's name. She wonders if there is a way to do this in Excel.
There are ways to do it, depending on how much time you want to spend. If this is a "one off" occurrence, you might consider just printing each individual worksheet manually. Or, you could copy each worksheet to its own workbook and then print each workbook to PDF.
These are quite manually intensive, though. (Which is why I said they may be good for only "one off" occurrences.) If you would like something a bit more automatic, you'll want to turn to using a macro to do the PDF files. Here's an example of a short macro that will do the PDF creation for you:
Sub CreatePDFs() Dim wks As Worksheet Dim sFolder As String Dim sTemp As String sFolder = ActiveWorkbook.Path & "\" sTemp = "Created PDFs for the following worksheets" For Each wks In ActiveWorkbook.Worksheets If wks.Visible = xlSheetVisible Then sTemp = sTemp & vbCrLf & " * " & wks.Name wks.ExportAsFixedFormat Type:=xlTypePDF, _ Filename:=sFolder & wks.Name & ".pdf", _ OpenAfterPublish:=False End If Next MsgBox sTemp End Sub
Note that the path stored in the sFolder variable is set to whatever path is associated with the active workbook. (If you haven't saved the active workbook yet, then the macro will not run properly.) This path is the folder in which the PDF files are saved. If you want them saved in a different location, just change the value assigned to the sFolder variable.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13570) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
If you want to save paper on a printout, you might consider printing multiple pages on a single piece of paper. This can ...
Discover MoreNeed to access the advanced capabilities of a printer from within an Excel macro? You may be out of luck, unless you ...
Discover MoreYou can design your worksheet so you can repeat rows at the top of a printout or columns at the left. Repeating columns ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments