Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Roman Numerals for Page Numbers.
Written by Allen Wyatt (last updated July 24, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
Excel includes a worksheet function (ROMAN) that allows you to convert Arabic numbers into Roman numerals. You may wonder if there is any such function that allows you to print Roman numerals as page numbers on a printout.
There is no built-in feature that allows you to do that, but you can create a macro that will do the trick. Consider the following macro:
Sub RomanPageNums() Dim iPages As Integer Dim J As Integer ' Get count of pages in active sheet iPages = ExecuteExcel4Macro("Get.Document(50)") ' Print worksheet, page by page With ActiveSheet For J = 1 To iPages ' Set page letter .PageSetup.CenterFooter = Application.Roman(J) ' Print page J .PrintOut From:=J, To:=J Next J End With End Sub
This macro first figures out how many pages are in your printout and assigns the value to the iPages variable. It then steps through each page, changing the page number in the center portion of the footer prior to printing each page. The page number is set by converting the current page number (J) to a Roman numeral using the ROMAN worksheet function.
If you want the Roman numerals to appear in other parts of the footer, you can replace the .CenterFooter property with either .LeftFooter or .RightFooter. You can also use .LeftHeader, .CenterHeader, or .RightHeader, if desired.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9362) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Roman Numerals for Page Numbers.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
You can easily create headers and footers for multiple worksheets by working with a selection set of the worksheets you ...
Discover MorePage numbers in Excel printouts are typically simple counters, without much chance for embellishment. If you want to add ...
Discover MoreWhen you have a worksheet that includes a long list of names, you may want the first and last names on each page to ...
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 © 2024 Sharon Parq Associates, Inc.
Comments