Excel can display numbers as words—like 123 as "one hundred twenty-three"—using a custom formula or VBA function, since there’s no built-in function for this. This is useful for financial documents, legal forms, invoices, or any situation where written numbers are required for clarity or compliance. No add-ins or external tools are needed; the solution uses only Excel’s native features.

What You'll Need

  • Microsoft Excel 2016 or later (Windows or Mac)
  • A column of numbers you want to convert
  • Basic familiarity with Excel formulas and the Developer tab

Step-by-Step

  1. Open your Excel workbook and ensure your numbers are in a single column, with no text, symbols, or empty cells mixed in. For example, enter 123 in cell A2, 456 in A3, and 789 in A4.
  2. Press Alt+F11 to open the Visual Basic for Applications (VBA) editor. If you don’t see the Developer tab in Excel, enable it by going to File > Options > Customize Ribbon, then check the box for Developer and click OK.
  3. In the VBA editor, click Insert > Module to create a new blank module window.
  4. Copy and paste the following VBA code exactly as shown into the module window:
Function NumberToWords(ByVal MyNumber As Double) As String
    Dim Dollars, Cents, Temp As String
    Dim DecimalPlace, Count As Integer
    ReDim Place(9) As String
    Place(2) = " Thousand "
    Place(3) = " Million "
    Place(4) = " Billion "
    Place(5) = " Trillion "
    
    MyNumber = Trim(Str(MyNumber))
    DecimalPlace = InStr(MyNumber, ".")
    If DecimalPlace > 0 Then
        Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
        MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
    End If
    
    Count = 1
    Do While MyNumber <> ""
        Temp = GetHundreds(Right(MyNumber, 3))
        If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
        If Len(MyNumber) > 3 Then
            MyNumber = Left(MyNumber, Len(MyNumber) - 3)
        Else
            MyNumber = ""
        End If
        Count = Count + 1
    Loop
    
    Select Case Dollars
        Case ""
            Dollars = "Zero"
        Case "One"
            Dollars = "One"
    End Select
    
    If Cents = "" Then
        NumberToWords = Dollars & " Dollars"
    Else
        NumberToWords = Dollars & " and " & Cents & " Cents"
    End If
End Function

Function GetTens(TensText As String) As String
    Dim Result As String
    Result = ""
    If Val(Left(TensText, 1)) = 1 Then
        Select Case Val(TensText)
            Case 10: Result = "Ten"
            Case 11: Result = "Eleven"
            Case 12: Result = "Twelve"
            Case 13: Result = "Thirteen"
            Case 14: Result = "Fourteen"
            Case 15: Result = "Fifteen"
            Case 16: Result = "Sixteen"
            Case 17: Result = "Seventeen"
            Case 18: Result = "Eighteen"
            Case 19: Result = "Nineteen"
            Case Else
        End Select
    Else
        Select Case Val(Left(TensText, 1))
            Case 2: Result = "Twenty"
            Case 3: Result = "Thirty"
            Case 4: Result = "Forty"
            Case 5: Result = "Fifty"
            Case 6: Result = "Sixty"
            Case 7: Result = "Seventy"
            Case 8: Result = "Eighty"
            Case 9: Result = "Ninety"
            Case Else
        End Select
        If Val(Right(TensText, 1)) <> 0 Then Result = Result & " " & GetDigit(Right(TensText, 1))
    End If
    GetTens = Result
End Function

Function GetHundreds(HundredsText As String) As String
    Dim Result As String
    If Val(Left(HundredsText, 1)) <> 0 Then
        Result = GetDigit(Left(HundredsText, 1)) & " Hundred"
    End If
    If Mid(HundredsText, 2, 1) <> "0" Or Mid(HundredsText, 3, 1) <> "0" Then
        Result = Result & " " & GetTens(Mid(HundredsText, 2))
    End If
    GetHundreds = Trim(Result)
End Function

Function GetDigit(Digit As String) As String
    Select Case Val(Digit)
        Case 1: GetDigit = "One"
        Case 2: GetDigit = "Two"
        Case 3: GetDigit = "Three"
        Case 4: GetDigit = "Four"
        Case 5: GetDigit = "Five"
        Case 6: GetDigit = "Six"
        Case 7: GetDigit = "Seven"
        Case 8: GetDigit = "Eight"
        Case 9: GetDigit = "Nine"
        Case Else: GetDigit = ""
    End Select
End Function
  1. Click File > Save to save the VBA project. Close the VBA editor by clicking the X button.
  2. Return to your Excel sheet. In the cell next to your first number (e.g., B2), type =NumberToWords(A2) and press Enter.
  3. Drag the fill handle (small square at the bottom-right corner of the selected cell) down to copy the formula to other cells in the column. Each number will now appear as its written equivalent.
  4. Save the workbook as a macro-enabled file (`.xlsm`) to preserve the VBA function. If you save as `.xlsx`, the function will be lost when you reopen the file.

Common Mistakes

  • Typing the function name incorrectly—ensure it’s exactly NumberToWords with correct capitalization and no spaces.
  • Using the formula in a non-macro-enabled file (.xlsx), which causes Excel to show #NAME? error because the function isn’t recognized.
  • Including text, decimals beyond two places, or negative numbers in the source cells; the function only handles positive whole numbers and up to two decimal places.
  • Forgetting to enable macros when opening the file, which disables the custom function. You’ll see a security warning when opening the file—click Enable Content.
  • Entering numbers with commas or currency symbols (like $1,234.56); clean the data first by using =VALUE(SUBSTITUTE(A2,"$","")) if needed.

Tips

  • For large datasets, use a helper column to clean your numbers first (remove symbols, round decimals) before applying the function.
  • Format the output column as text to prevent Excel from auto-formatting long words into scientific notation.
  • Test the function with small numbers first (like 1, 10, 100) to confirm it works before applying to hundreds of entries.
  • Copy and paste values after conversion if you need to share the file with others who don’t have macros enabled.
  • Keep a backup of your original data—VBA functions don’t reverse automatically if deleted.
  • Consider using a template with the function pre-loaded for recurring tasks like payroll or legal documents.

Troubleshooting

  • If you see #NAME?, the function isn’t recognized. Check that you saved the file as .xlsm and enabled macros when opening. Also confirm the VBA code was pasted correctly into a Module, not a worksheet.
  • If the result shows only "Zero" or blank, your input cell might contain text, symbols, or a value Excel can’t parse. Use the =ISNUMBER(A2) function to verify the cell contains a number.
  • If decimals are not converting correctly (e.g., 1.5 shows as "One Dollars and "), ensure the decimal part is exactly two digits. Use =ROUND(A2,2) to force two decimal places before feeding it to the function.
  • If Excel freezes or crashes after pasting code, restart Excel. Sometimes corrupted VBA projects cause instability. Re-enter the code in a new module.
  • If you’re on a work computer and can’t access VBA, contact your IT department—macro execution may be blocked by group policy. Ask for an approved template or use a manual workaround like a lookup table.

Frequently Asked Questions

Can I convert negative numbers to words?

The provided function does not handle negative numbers. To support negatives, modify the first line of the NumberToWords function to check if MyNumber < 0, prepend "Negative " to the result, and convert the absolute value.

Does this work on Excel for Mac?

Yes, the same VBA code works on Excel for Mac. Enable the Developer tab via Excel Preferences > Ribbon & Toolbar, then follow the same steps.

What’s the largest number this can handle?

The function supports numbers up to trillions (10^12). For larger numbers, extend the Place array with "Quadrillion" and adjust the loop logic accordingly.

Can I use this without VBA?

No, Excel has no native formula to convert numbers to words. You must use VBA or a third-party add-in. Manual lookup tables are possible but impractical beyond small ranges.

Why does it say "Dollars" and "Cents"? Can I change that?

Yes. Edit the two lines in the NumberToWords function that append " Dollars" and " Cents"—replace them with your preferred units, like "Rupees" or "Euros" and "Paise".

Will this work in Google Sheets?

No, this VBA code only works in Excel. Google Sheets uses Apps Script, which has different syntax. You would need to rewrite the logic as a custom function in JavaScript.