Excel has no built-in function that turns 1234 into "one thousand two hundred thirty-four," but a short custom VBA function does. You paste a small function into a standard module, save the workbook as a macro-enabled file (.xlsm), and from then on you can type =NumberToWords(A2) in any cell to get the spelled-out text. This is handy for invoices, cheques, legal documents and any sheet where the same number has to appear in both digits and words.

What You'll Need

  • Excel for Windows or Mac with the Developer tab available (it is hidden by default and can be switched on).
  • A workbook saved as .xlsm (Excel Macro-Enabled Workbook) or .xlsb, because a standard .xlsx cannot store macros.
  • Macro security settings that allow your own macros to run. On a managed work computer these may be locked down, and you would then need your IT team to allow signed macros.
  • Basic comfort with copying and pasting code into the Visual Basic Editor. No programming knowledge is required beyond that.

Step-by-Step

  1. Show the Developer tab. Right-click any empty area of the ribbon and choose Customize the Ribbon, then tick Developer in the right-hand list and click OK. On Mac, open Excel's preferences and look for the ribbon or toolbar customisation section; the exact wording differs slightly by version and platform.
  2. Save a macro-enabled copy first. Use File > Save As and pick Excel Macro-Enabled Workbook (*.xlsm). Do this before writing any code so you never lose work when Excel warns you about macros.
  3. Open the Visual Basic Editor with Developer > Visual Basic (or press Alt+F11 on Windows). A separate editor window opens.
  4. Insert a standard module. In the editor choose Insert > Module. A blank code pane appears in the Project Explorer under your workbook name. Do not paste into a sheet's code module or into ThisWorkbook: functions placed there are not visible to worksheet formulas.
  5. Paste the function. Copy the block below into the blank module. It handles zero, negative numbers, decimals to two places, and values up to 999,999,999,999.
    Function NumberToWords(ByVal n As Variant) As String
        Dim neg As Boolean, s As String
        Dim intPart As Double, decPart As Double
        If IsEmpty(n) Or Not IsNumeric(n) Then
            NumberToWords = ""
            Exit Function
        End If
        If n < 0 Then neg = True: n = Abs(n)
        intPart = Int(n)
        decPart = Round((n - intPart) * 100)
        If decPart >= 100 Then intPart = intPart + 1: decPart = decPart - 100
        s = WordsBelow1000(intPart)
        If s = "" Then s = "zero"
        If decPart > 0 Then
            s = s & " point " & WordsBelow1000(decPart)
        End If
        If neg Then s = "minus " & s
        NumberToWords = s
    End Function
    
    Private Function WordsBelow1000(ByVal n As Double) As String
        Dim ones, tens, scales, out As String, grp As Double, i As Integer
        "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")
        If n = 0 Then WordsBelow1000 = "": Exit Function
        i = 0
        Do While n > 0
            grp = n Mod 1000
            If grp > 0 Then
                Dim part As String, h As Integer, t As Integer, u As Integer
                h = Int(grp / 100): t = Int((grp Mod 100) / 10): u = grp Mod 10
                part = ""
                If h > 0 Then part = ones(h) & " hundred"
                If t > 1 Then
                    part = Trim(part & " " & tens(t))
                    If u > 0 Then part = part & "-" & ones(u)
                ElseIf t = 1 Then
                    part = Trim(part & " " & ones(10 + u))
                ElseIf u > 0 Then
                    part = Trim(part & " " & ones(u))
                End If
                out = Trim(part & scales(i) & " " & out)
            End If
            n = Int(n / 1000)
            i = i + 1
        Loop
        WordsBelow1000 = Trim(out)
    End Function
    This uses British-style "and"-free wording; you can add "and" before the final group if your locale expects it.
  6. Save and return to the sheet. Press File > Save in the editor, then close it (Alt+Q on Windows). Your workbook must stay saved as .xlsm.
  7. Test it in a cell. Type a number such as 250 in A2, then in B2 enter =NumberToWords(A2). You should see two hundred fifty. Test 0, a negative number, 1000000 and a value with cents to confirm each branch works.
  8. Fill it down. Drag the fill handle from B2 to apply the formula to the rest of your column. It behaves like any normal worksheet function: it recalculates automatically when A2 changes.
  9. Walk through the macro prompt once. When you reopen the file, click Enable Content on the security bar if it appears. If your organisation blocks macros entirely, the function cell will show #NAME? and only an administrator can change that.

Common Mistakes

  • Saving as .xlsx. Excel strips macros silently; the formula then returns #NAME? after you reopen. Always check the title bar says .xlsm.
  • Pasting into the wrong module. Code in a worksheet module or ThisWorkbook compiles but cannot be called from a cell. It must live in a standard module.
  • A name clash. If you name the function something Excel already uses, or leave it Private, the formula will not resolve. Give it a distinct name such as NumberToWords.
  • Exact-match spelling in the prompt. "Enable macros" means clicking Enable Content; typing over the security bar does nothing.
  • Expecting regional number formats. The function returns English words only. If your sheet uses a comma as the decimal separator, the cents part will still be formatted with a point inside the text.
  • Forgetting precision. Very large values or floating-point cents can round oddly; check the output on long serial numbers before relying on it.

Tips

  • Keep one copy of the module in a Personal.xlsb or an add-in if you need the function in many workbooks, so you do not paste it each time.
  • Wrap the result in a capitalisation formula if you need title case or ALL CAPS, for example =UPPER(NumberToWords(A2)).
  • If your currency needs "and" before cents ("two hundred and fifty"), edit the concatenation line to insert it.
  • Protect the module with a password if you share the file, so recipients do not accidentally edit the code.
  • Document the workbook so colleagues know the file must be opened with macros enabled and saved as .xlsm.

Troubleshooting

If that did not work, start with the simplest checks. Reopen the file and look for the Enable Content bar; if it is missing and the cell shows #NAME?, confirm the module still exists by opening Visual Basic and checking the Project Explorer. Re-save as .xlsm if the title bar shows .xlsx. If #VALUE! appears, the input cell contains text rather than a number: check for stray spaces or a leading apostrophe.

If the code errors when you run it, click Debug in the error dialog to see the highlighted line, then compare it with the block above character by character; a missing colon or an unclosed parenthesis is the usual culprit. If Excel disables the macro entirely, check Trust Center macro settings under File > Options > Trust Center > Trust Center Settings (wording varies by version), but do not lower settings on a work computer without permission. As a last resort, delete the module, re-paste the clean code, and save again. Deleting the module only removes the function, not your data.

Frequently Asked Questions

Can Excel convert numbers to words without VBA?

Not with a built-in worksheet function. There is no native NUMBERVALUE-style text spell-out. Some templates use nested IF and VLOOKUP workarounds, but a VBA function is the standard approach.

Will the function work on Mac?

Yes, the VBA language and the standard-module approach work in Excel for Mac. Menu wording for the Developer tab and the Visual Basic editor differs slightly.

Does the formula update when the number changes?

Yes. It is a normal user-defined function, so it recalculates whenever its input cell changes, just like SUM or SUMIF.

Why does my file show a warning when opened?

Excel flags macro-enabled files for safety. Click Enable Content only if you trust the file, and never enable macros from an unknown sender.

Can I share the workbook with someone who has no macros?

The formula will not calculate for them; they will see #NAME? unless they enable macros. Ask them to allow the macro, or send a copy with values pasted in place of the formulas.

Does it handle negative numbers and decimals?

Yes. The code above prefixes "minus" and appends "point" plus the cents. Test one example before relying on it for large batches.