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.

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:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Making Phone Numbers into Active Links

Want to use phone numbers in your documents and have those numbers be clickable links? This tip discusses all the ins and ...

Discover More

Converting Strings to Numbers

When creating macros, you often need to convert a text string that contains numbers into actual numeric values. You do ...

Discover More

Spelling Out Page Numbers

If your document is more than a couple of pages long, adding page numbers is a nice finishing touch. If you want, you can ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Putting Headers and Footers on Multiple Worksheets

You can easily create headers and footers for multiple worksheets by working with a selection set of the worksheets you ...

Discover More

Sequential Page Numbers Across Worksheets

How do you want your page numbers to appear on your printed worksheets? Chances are good that you want them to be ...

Discover More

Adding Ampersands in Headers and Footers

Add an ampersand to the text in a header or footer and you may be surprised that the ampersand disappears on your ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.