WP Workflow Picks
excelformulasordinal numbers

Excel 111th: Ordinal Suffix Formulas That Get 11th to 113th Right

Why Excel formulas turn 111 into 111st, and which ordinal suffix formulas, rank formulas and conditional formats handle 11th, 12th, 13th and 111th correctly.

WP Workflow Picks team · · 5 min read · 7 sources
Churchill Club Top 10 Tech Tech Trends Debate 2013 — I chose Deep Learning / Machine Learning
Photo: jurvetson (CC BY 2.0) via Openverse

If you are searching for “excel 111th”, you almost certainly want Excel to write 111th (not 111st), along with 11th, 12th and 13th. The fix is to check the last two digits with MOD(A1,100) before looking at the last digit, and the one-line formula below does exactly that.

Excel has no built-in ordinal function or number format for this, as Office Watch and the AskWoody forum both point out. So you either build the suffix with a formula (which gives you text) or fake it with conditional formatting (which keeps a real number). Both are covered below. These methods use standard worksheet functions and work the same way as of November 2026.

The quick answer: a formula that handles 111th

Put your number in A1 and use:

=A1&IF(OR(MOD(A1,100)={11,12,13}),"th",CHOOSE(MIN(5,RIGHT(A1)+1),"th","st","nd","rd","th"))

This version was shared on the AskWoody forum. Here is what it does with some tricky inputs:

NumberLast two digitsResult
1011st
111111th
212121st
10101101st
11111111th
11212112th
11313113th
12222122nd

Why naive formulas get 111 wrong

Most quick formulas look only at the last digit: 1 means “st”, 2 means “nd”, 3 means “rd”, everything else “th”. That breaks for any number ending in 11, 12 or 13, including 111, 211 and 1,012. English treats those as “th” numbers.

The fix is the MOD(A1,100) test. According to Microsoft’s MOD documentation, MOD returns the remainder after division, so MOD(111,100) is 11. If that remainder is 11, 12 or 13, the formula returns “th” and stops there. Only otherwise does it look at the last digit.

RIGHT(A1) gets that last digit. Microsoft’s RIGHT documentation notes that if you leave out the character count it defaults to 1. MIN(5, ...) makes sure every digit from 4 to 9 (and 0) lands on “th”.

Three formula options compared

Several reliable formula patterns are in common use. They all produce the same result for positive whole numbers. They just differ in how easy they are to read.

ApproachBest forNotes
IF + OR + CHOOSE (above)Most peopleEasy to read; exceptions listed explicitly
IF + AND + CHOOSE with ABSLists that may contain negativesThe pattern Exceljet uses for its general version
MID on a “thstndrdth” stringCompact, single-function fansShortest, hardest to read

Option 2: the Exceljet-style MOD and CHOOSE formula

Exceljet’s ordinal suffix guide uses an IF(AND(...)) test to trap the 11 to 13 range, then a 10-item CHOOSE for every other last digit. Written out in full, that pattern looks like this:

=A1&IF(AND(MOD(ABS(A1),100)>10,MOD(ABS(A1),100)<14),"th",CHOOSE(MOD(ABS(A1),10)+1,"th","st","nd","rd","th","th","th","th","th","th"))

ABS stops negative numbers from breaking the logic. Some versions online use >=10 and <=14 instead. That also catches 10 and 14, but both take “th” anyway, so the result is the same.

Option 3: the compact MID formula

An ExcelForum tutorial offers a very short version that pulls two letters out of the string “thstndrdth”:

=A1&MID("thstndrdth",MIN(9,2*RIGHT(A1)*(MOD(A1-11,100)>2)+1),2)

The (MOD(A1-11,100)>2) part is FALSE (zero) when the last two digits are 11, 12 or 13. That makes the start position 1, which is “th”. It works, but it is harder to check later, so leave a cell comment if you use it in a shared workbook.

Adding ordinals to a ranking

A common reason to need 111th is a leaderboard or sales ranking. Exceljet’s approach is to calculate the rank first and then add the suffix:

  1. In C2, calculate the rank, for example =RANK(B2,$B$2:$B$200).
  2. In D2, use any formula above, with C2 in place of A1.
  3. Fill both columns down.

Two things to watch:

  • Ties. RANK gives tied values the same rank and then skips the next one, so you might see two 4ths and no 5th. Exceljet covers a COUNTIF-based adjustment if you need unique ranks.
  • Keep column C. The result in column D is text, so sort and filter on the numeric rank in C, not on D.

Ordinal dates: “November 11th”

For dates, apply the same logic to the day number. With a date in A1:

  1. Replace A1 in the formula with DAY(A1) to get the day plus suffix, for example 11th.
  2. Join on the rest of the date with TEXT, for example &" "&TEXT(A1,"mmmm yyyy").

The ExcelForum tutorial above covers ordinal dates in detail. As it stresses, the suffix is for display only. The underlying value is still the date or number.

Keeping the value numeric with conditional formatting

Every formula above turns your number into text. That matters if you need to sort numerically, total the column or point other formulas at it. As AskWoody contributors note, a single custom number format cannot switch between four suffixes. You can get the same visual result by layering conditional formatting rules, each applying its own custom format. This is the approach TechRepublic describes.

  1. Select the range, for example A1:A200.
  2. Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
  3. Add a rule for 11 to 13: =AND(MOD(ABS(A1),100)>10,MOD(ABS(A1),100)<14). Click Format > Number > Custom and enter 0"th".
  4. Add rules for =MOD(ABS(A1),10)=1 with 0"st", =MOD(ABS(A1),10)=2 with 0"nd", and =MOD(ABS(A1),10)=3 with 0"rd".
  5. Give the range itself a default custom format of 0"th" (via Format Cells > Number > Custom) to cover every other number.
  6. Open Manage Rules and move the 11 to 13 rule to the top, so it wins over the “st”, “nd” and “rd” rules.

Step 6 is the one people miss. If the “ends in 1” rule is checked first, 111 shows as 111st again. The basic TechRepublic rule set does not handle 11 to 13 on its own, which is why the extra rule is needed.

Which method should you use?

  • One-off label or report text: the IF + OR + CHOOSE formula. It is the easiest to read and to audit later.
  • Rankings you will sort: keep the numeric rank in one column and the ordinal text in another.
  • A column that must stay numeric: conditional formatting, with the 11 to 13 rule on top.

Whichever you pick, test it with 11, 12, 13, 111, 112 and 113 before you share the workbook. Those are the numbers that catch out most suffix formulas.

Frequently asked questions

Why does my Excel formula show 111st instead of 111th? +

Your formula is probably only checking the last digit, which is 1, so it picks "st". Numbers whose last two digits are 11, 12 or 13 always take "th", so the formula needs to test MOD(number,100) before it looks at the last digit.

Can a custom number format add st, nd, rd and th by itself? +

No. Forum experts and tutorial sites agree that a single custom number format cannot switch between four suffixes. You can get close with conditional formatting rules that each apply a different custom format, or use a formula that returns text.

Can I still sort or calculate with 111th after adding the suffix? +

Only if you added it with number formatting or conditional formatting, because the cell still holds the number 111. A formula like =A1&"th" returns text, so keep the original number in its own column for sorting and maths.

Does the formula work for dates, like the 11th of November? +

Yes. Wrap the date in DAY() so the formula works on the day number, then join the result to the rest of the date with TEXT(), for example the month and year.

Sources

  1. Rank with ordinal suffix - Exceljet (exceljet.net)
  2. Ordinal dates and numbers in Excel 2007 or later - ExcelForum (excelforum.com)
  3. Custom format for rankings - AskWoody (askwoody.com)
  4. Pro tip: Add an ordinal indicator to a value in Excel - TechRepublic (techrepublic.com)
  5. Office Watch: ordinal numbers in Excel (office-watch.com)
  6. MOD function - Microsoft Support (support.microsoft.com)
  7. RIGHT function - Microsoft Support (support.microsoft.com)
About this guide. Researched and drafted with AI assistance from the sources above, then checked against our editorial rules. It reflects what was publicly known on November 16, 2026; details can change, so confirm with the official source before acting on it. How we work →

Our reviews

In-depth reviews from Workflow Picks that go with this topic.

Keep reading