How to Convert Numbers to Words in Excel

Excel doesn’t have a built-in function to convert numbers to words, so 1,234.56 can’t become “One Thousand Two Hundred Thirty-Four Dollars and Fifty-Six Cents” with a standard formula. The usual solution is to add a small SpellNumber function with VBA: press Alt + F11, insert a module, paste the code below, then type =SpellNumber(A2) in any cell. Save the workbook as .xlsm to keep it. If you need a number stored as text instead, that’s a different task, covered at the end.

How to convert numbers to words in Excel
A short VBA function adds SpellNumber to your workbook. Drawn example; your editor may look a little different.

Step 1: Open the VBA editor

  1. Open the workbook and press Alt + F11. On a Mac, use Tools > Macro > Visual Basic Editor.
  2. Choose Insert > Module. A blank code window opens.

Step 2: Paste the SpellNumber code

Copy all of this code into the module window:

Function SpellNumber(ByVal amount As Double) As String
    Dim dollars As Double, cents As Long
    dollars = Int(Abs(amount))
    cents = Round((Abs(amount) - dollars) * 100, 0)
    If cents = 100 Then dollars = dollars + 1: cents = 0
    SpellNumber = IIf(dollars = 0, "Zero", NumWords(dollars)) & IIf(dollars = 1, " Dollar", " Dollars")
    If cents > 0 Then SpellNumber = SpellNumber & " and " & NumWords(cents) & IIf(cents = 1, " Cent", " Cents")
    If amount < 0 Then SpellNumber = "Minus " & SpellNumber
End Function

Private Function NumWords(ByVal n As Double) As String
    Dim units, tens, scales, i As Integer, chunk As Long, part As String, result As String
    units = Array("", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", _
        "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen")
    tens = Array("", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety")
    scales = Array("", " Thousand", " Million", " Billion")
    Do While n > 0 And i <= 3
        chunk = n - Int(n / 1000) * 1000
        n = Int(n / 1000)
        If chunk > 0 Then
            part = ""
            If chunk >= 100 Then part = units(chunk \ 100) & " Hundred": chunk = chunk Mod 100
            If chunk >= 20 Then
                part = part & IIf(part = "", "", " ") & tens(chunk \ 10)
                If chunk Mod 10 > 0 Then part = part & "-" & units(chunk Mod 10)
            ElseIf chunk > 0 Then
                part = part & IIf(part = "", "", " ") & units(chunk)
            End If
            result = part & scales(i) & IIf(result = "", "", " ") & result
        End If
        i = i + 1
    Loop
    NumWords = result
End Function

Close the editor. The function handles amounts up to the hundreds of billions, rounds to the nearest cent, and adds “Minus” for negative numbers.

Step 3: Use the function

In any cell, type =SpellNumber(A2), where A2 holds the number, and press Enter. Copy it down a column like any formula.

NumberResult
1234.56One Thousand Two Hundred Thirty-Four Dollars and Fifty-Six Cents
17Seventeen Dollars
1000000One Million Dollars
0.75Zero Dollars and Seventy-Five Cents

Step 4: Save as a macro-enabled workbook

Choose File > Save As and pick Excel Macro-Enabled Workbook (*.xlsm). If you save as .xlsx, Excel removes the code and the cells show #NAME?. When you open the file later, click Enable Content. If macros are blocked, running macros in Excel explains what to change.

How the code works

SpellNumber splits the amount into dollars and cents and rounds the cents to two places. The helper function, NumWords, breaks the dollar amount into groups of three digits from the right: ones, thousands, millions and billions. For each group it writes the hundreds, then the tens and ones, using two lists of words, and adds the right scale word. Numbers from 11 to 19 have their own words, so they’re looked up directly instead of being built from tens and ones. Hyphens are added between tens and ones, such as Thirty-Four, which matches how amounts are written on checks.

When you’d use this

  • Printing checks or payment vouchers from a list of amounts.
  • Invoices and receipts that must show the amount in words.
  • Contracts, quotes and legal documents where figures are written out to prevent tampering.
  • Teaching materials or worksheets that need numbers spelled out.

If you’re building invoices or checks, combine the result with other text, for example ="Amount: "&SpellNumber(B5)&" only", to match the wording your bank or accounting team expects. You can then link the cell into Word for printing.

On a Mac

The same code works in Excel for Mac. Open the editor from Tools > Macro > Visual Basic Editor, choose Insert > Module, paste the code, and save the file as an Excel Macro-Enabled Workbook. Excel for the web and the mobile apps can open the file but can’t run the function, so the cells keep the last calculated value.

Change the currency words

To spell out another currency, replace “Dollar”, “Dollars”, “Cent” and “Cents” in the first function, for example with “Pound”, “Pounds”, “Penny” and “Pence”. To show plain words with no currency, change the two lines that build the result to use only NumWords(dollars).

Use it in every workbook

To make SpellNumber available everywhere, paste the code into your Personal Macro Workbook instead: record any short macro and choose Store macro in: Personal Macro Workbook, then add the code to a module in PERSONAL.XLSB. Call it with =PERSONAL.XLSB!SpellNumber(A2). You can also save the module as an Excel add-in (.xlam) and turn it on in File > Options > Add-ins.

No-macro alternatives

  • Word fields: in Word, press Ctrl + F9 and type = 1234 \* CardText between the braces, then press F9. Word shows “one thousand two hundred thirty-four”. Use \* DollarText for amounts with cents as a fraction. This is handy for one-off checks or contracts.
  • BAHTTEXT: Excel’s only built-in spelling function, but it outputs Thai text, so it isn’t useful for English.

Numbers stored as text (a different task)

If you searched for this because you want 00123 to keep its zeros, or need numbers formatted as text for a lookup, use =TEXT(A2,"0") or the Text format instead. More options are in converting a number to text in Excel, and currency symbols are covered in adding dollar signs in Excel.

Troubleshooting

#NAME? in the cell

Macros are disabled, the file was saved as .xlsx, or the code is in a sheet’s code window rather than a module. Re-add it with Insert > Module.

#VALUE!

The cell contains text, not a number. Clean it with =VALUE(A2).

Summary

  1. Press Alt + F11 and choose Insert > Module.
  2. Paste the SpellNumber code.
  3. Type =SpellNumber(A2) in a cell.
  4. Save as .xlsm and enable macros when opening.