How to format number as ordinal (1st 2nd 3rd ) in Excel?
In some cases, we need to format number as 1st, 2nd, 3rd, etc. when we rank as below screenshot shown. However, do you know how to format these cardinal numbers as ordinal numbers in Excel? In general, there is no built-in function to convert number as 1st in Excel, but, here I can introduce some tricks on this problem.
Format number as ordinal with VBA
Format number as ordinal with Kutools for Excel ![]()
Comparison of Methods for Formatting Numbers as Ordinals in Excel
Ordinal numbers such as 1st, 2nd, 3rd, and 4th are commonly used in rankings, reports, and competition results. The following table compares the methods introduced in this article.
| Feature | VBA | Kutools Convert Number to Ordinal |
|---|---|---|
| Convert numbers to ordinal format (1st, 2nd, 3rd...) | ✔ | ✔ |
| Batch conversion | Requires filling the custom function | ✔ |
| Requires VBA | ✔ | ✘ |
| Requires formulas | ✔ (Custom Function) | ✘ |
| One-click conversion | ✘ | ✔ |
| Works directly on selected cells | ✘ | ✔ |
| Requires enabling macros | ✔ | ✘ |
| Programming knowledge required | Basic VBA knowledge | None |
| Setup process | Insert the VBA module, create the Addth function, enter the formula, then fill it down. | Select the numbers and click Kutools > Content > Convert Number to Ordinal. |
| Best for | Users comfortable with VBA and custom functions | Quickly formatting rankings without formulas or VBA |
| Ease of use | Moderate | Very easy |
Format number as ordinal with VBA
To format number as ordinal, here is a macro code can help you.
1. Press Alt + F11 keys to enable Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste below VBA to the Module script. See screenshot:
VBA: Format number as ordinal
Function Addth(pNumber As String) As String
'UpdatebyExtendoffice20160628
Select Case CLng(VBA.Right(pNumber, 1))
Case 1
Addth = pNumber & "st"
Case 2
Addth = pNumber & "nd"
Case 3
Addth = pNumber & "rd"
Case Else
Addth = pNumber & "th"
End Select
Select Case VBA.CLng(VBA.Right(pNumber, 2))
Case 11, 12, 13
Addth = pNumber & "th"
End Select
End Function 
3. Then select a blank cell next to the number you want to format as ordinal, C2 for instance, and enter this formula =Addth(B2), B2 is the number you use, and press Enter key, then drag autofill handle over the cells you want to apply this formula. See screenshot:
Format number as ordinal with Kutools for Excel
If you are not good at executing macro code, you can try to apply Kutools for Excel’s Convert Number to Ordinal utility, which just needs one click to handle the job.
After free installing Kutools for Excel, please do as below:
Select the numbers you want to format as ordinal, and click Kutools > Content > Convert Number to Ordinal. See screenshot:

Convert number to Ordinal
Conclusion
Excel does not include a built-in feature for converting numbers directly into ordinal values such as 1st, 2nd, or 3rd. The VBA solution overcomes this limitation by creating a custom function that automatically appends the correct ordinal suffix. It is suitable for users who are familiar with macros and need a reusable worksheet function.
Kutools for Excel's Convert Number to Ordinal provides a much simpler solution. With a single click, it converts the selected numbers into ordinal format without writing VBA code or formulas. This makes it the fastest and most convenient option for formatting rankings, positions, and ordered lists in Excel.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in