Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Roman Numerals for Page Numbers.

Roman Numerals for Page Numbers

Written by Allen Wyatt (last updated October 21, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003


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.WorksheetFunction.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.

The code in the RomanPageNums macro works in all the recent versions of Excel. If you are using Excel 2000 or greater, you could also replace the actual line that sets the footer with the following code:

            .PageSetup.CenterFooter = Application.Roman(J)

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 (2518) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) 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

Preventing Changes to Formatting and Page Size

When you create workbooks for others to use, you might want to make sure that they can't change the formatting and paper ...

Discover More

Fitting Your Printout on a Page

Tired of wasting paper when you print a worksheet? You can scale Excel's output so that it fits only the number of pages ...

Discover More

Enabling and Disabling Windows Features

Want to make sure that Windows is trim and fit, using only those features you routinely use? Here's how to enable or ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (menu)

Page Numbers in VBA

When you print a larger worksheet, Excel breaks the printout across several pages. You may want to know, before you ...

Discover More

Changing Page Number Format

Need your page numbers to not appear as regular Arabic numerals? Here's a way to get them to appear in a different ...

Discover More

Adding Page Numbers

Printing more than a single page? You may want to add page numbers to your printout, as discussed in this tip.

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 6 - 0?

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 menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon 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.