To display an amount in words in Excel (e.g., $1250.50 as "One Thousand Two Hundred Fifty and 50/100 Dollars"), you must use a custom VBA function—Excel has no built-in formula for this. Once set up, the function works instantly across your workbook. Below is the full process to implement it safely and correctly.
What You'll Need
- Microsoft Excel installed (Windows version required—VBA macros are not supported on Excel for Mac, Excel Online, or mobile apps)
- Macro security settings adjusted to allow VBA code execution
- Basic familiarity with the Excel ribbon and Developer tab
Step-by-Step
- Enable the Developer tab: Open Excel, go to File > Options > Customize Ribbon. Under Main Tabs, check the box next to Developer, then click OK. The Developer tab will now appear on the ribbon.
- Open the VBA editor: With the Developer tab active, click Visual Basic. Alternatively, press Alt + F11 on Windows. The Visual Basic for Applications window will open.
- Insert a new module: In the VBA editor, go to Insert > Module. A blank code window (Module1) will appear on the right.
- Paste the NumToWords function: Copy and paste the following complete VBA code into the Module1 window. This function supports U.S. dollars and cents, handles decimals, and formats output as currency text:
Function NumToWords(ByVal MyNumber) Dim Dollars, Cents, Temp Dim DecimalPlace, Count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " ' Convert MyNumber to a string, trimming extra spaces. MyNumber = Trim(Str(MyNumber)) ' Find decimal place. DecimalPlace = InStr(MyNumber, ".") ' Convert dollars and set up cents. If DecimalPlace > 0 Then Dollars = Trim(Left(MyNumber, DecimalPlace - 1)) Cents = Trim(Mid(MyNumber, DecimalPlace + 1)) Cents = Left(Cents & "00", 2) ' Pad to two digits Else Dollars = MyNumber Cents = "00" End If ' Convert dollars. Count = 1 Do While Dollars <> "" Temp = ConvertHundreds(Right(Dollars, 3)) If Temp <> "" Then If Count = 1 Then Dollars = Temp & Place(Count) & Dollars Else Dollars = Temp & Place(Count) & " " & Dollars End If End If If Len(Dollars) > 3 Then Dollars = Left(Dollars, Len(Dollars) - 3) Else Dollars = "" End If Count = Count + 1 Loop ' Clean up dollars string. Select Case Dollars Case "": Dollars = "Zero" Case "One": Dollars = "One" Case Else: Dollars = Dollars End Select ' Clean up cents. Select Case Cents Case "00": Cents = " and 00/100" Case Else: Cents = " and " & Cents & "/100" End Select ' Return result with currency label. NumToWords = Dollars & " Dollars" & Cents End Function Function ConvertHundreds(ByVal MyNumber) Dim Result ' Exit if beyond 999. If Val(MyNumber) = 0 Then Exit Function ' Pad with leading zeros. MyNumber = Right("000" & MyNumber, 3) ' Convert hundreds place. If Left(MyNumber, 1) <> "0" Then Result = ConvertDigit(Left(MyNumber, 1)) & " Hundred " End If ' Convert tens and ones. If Mid(MyNumber, 2, 1) <> "0" Then Result = Result & ConvertTens(Mid(MyNumber, 2)) Else Result = Result & ConvertDigit(Mid(MyNumber, 3)) End If ConvertHundreds = Trim(Result) End Function Function ConvertTens(ByVal MyTens) Dim Result ' Is it between 10 and 19? If Val(Left(MyTens, 1)) = 1 Then Select Case Val(MyTens) 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" End Select Else ' It's 20–99. Select Case Val(Left(MyTens, 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 " End Select Result = Result & ConvertDigit(Right(MyTens, 1)) End If ConvertTens = Result End Function Function ConvertDigit(ByVal MyDigit) Select Case Val(MyDigit) Case 0: ConvertDigit = "" Case 1: ConvertDigit = "One" Case 2: ConvertDigit = "Two" Case 3: ConvertDigit = "Three" Case 4: ConvertDigit = "Four" Case 5: ConvertDigit = "Five" Case 6: ConvertDigit = "Six" Case 7: ConvertDigit = "Seven" Case 8: ConvertDigit = "Eight" Case 9: ConvertDigit = "Nine" End Select End Function - Save the workbook as macro-enabled: Close the VBA editor and return to Excel. Click File > Save As. In the Save As dialog, choose Excel Macro-Enabled Workbook (*.xlsm) from the Save as type dropdown. Click Save.
- Set macro security appropriately: Go to File > Options > Trust Center > Trust Center Settings > Macro Settings. Select "Disable all macros with notification" (not "Disable all macros without notification"). Click OK twice to save. When you open the file next, you will see a security warning—click Enable Content to run the function.
- Use the function in a cell: In any cell, enter =NumToWords(A1) (assuming A1 contains your numeric amount like 1250.50). Press Enter. The result will appear as "One Thousand Two Hundred Fifty and 50/100 Dollars".
Common Mistakes
- Using Excel Online or mobile app: VBA functions do not work in Excel for the web, iOS, or Android. You must use Excel for Windows desktop.
- Forgetting to save as .xlsm: Saving as .xlsx strips VBA code, causing the function to return #NAME? errors.
- Ignoring macro security warnings: If you decline to enable macros when opening the file, the function will not run.
- Typing the function name incorrectly: Excel is case-insensitive for formulas, but misspelling "NumToWords" (e.g., "NumToWord" or "NumtoWords") will cause #NAME? errors.
- Passing non-numeric values: If the referenced cell contains text or is blank, the function will return a runtime error or #VALUE!.
Tips
- For international use, modify the "Dollars" and "/100" segments in the return statement to match your currency (e.g., "Euros", "Pounds", "Rupees").
- Format the source cell as Currency or Number with two decimal places to avoid unexpected rounding (e.g., 100.1 becomes 100.10).
- Use a helper column if you need to copy the result as static text: after the function calculates, copy the result, right-click the destination cell, and choose Paste Special > Values.
- Test with edge cases: 0, 0.01, 1000000, and negative numbers (the function does not handle negatives—add logic if needed).
- Keep a backup copy of the .xlsm file with the code intact in case of corruption.
Troubleshooting
When the formula returns an error, follow these checks in order:
- #NAME? error: This means Excel does not recognize the function. Confirm the workbook is saved as .xlsm, the Developer tab was used to insert the module, and macros are enabled when opening the file. Re-paste the code if needed.
- #VALUE! error: The input cell likely contains text, a non-numeric value, or is empty. Ensure the referenced cell holds a valid number.
- Function works once but disappears: You probably saved the file as .xlsx instead of .xlsm. Re-save as Excel Macro-Enabled Workbook.
- Function returns blank or partial text: Check for leading/trailing spaces in the source cell. Use =TRIM(A1) as input (e.g., =NumToWords(TRIM(A1))).
- Running out of memory or Excel crashes: Large numbers (over trillions) or corrupted modules can cause instability. Re-paste the code into a fresh module and avoid referencing thousands of rows if performance is slow.