Home / Guides / Troubleshooting SpellNumber in Excel
Spreadsheets

Troubleshooting SpellNumber in Excel.

A custom SpellNumber function turns numbers into words inside Excel, but a handful of issues trip people up. Here are the four most common and how to fix each.

1. The #NAME? error

If your formula returns #NAME?, Excel can't find the function. The usual cause is that the workbook was saved as a standard .xlsx, which strips out macro code. Save it instead as a macro-enabled .xlsm workbook, and make sure macros are enabled when you reopen it. The same error appears if the VBA module was never inserted — check that the code lives in a Module under Insert → Module, not behind a worksheet. If you'd rather avoid macros entirely, the modern LAMBDA approach on the Excel number-to-words page needs no macro-enabled file at all.

2. Decimal zeros get dropped

A classic bug: 100.02 spells correctly as "... and Two Cents", but 100.20 comes out as "... and Two Cents" too, because the trailing zero was lost when the decimal was read as a number. The fix is to format the decimal part as a fixed two-character string before parsing it, for example Format(DecimalPart, "00"), so .20 stays "20" and .02 stays "02". Always work the cents from a two-digit string, never from a raw fraction.

3. Overflow on large numbers

If a big invoice total throws a runtime overflow, the culprit is usually a variable declared as Integer, which in VBA caps at 32,767. Declare amounts as Double or Currency instead. For very large figures beyond about 15 significant digits, even a Double loses precision; in that case feed the value in as text and parse the digits as a string rather than as a number.

4. The sheet recalculates slowly

A custom function runs once per cell, so a column of thousands of conversions can feel sluggish. Two fixes help. First, wrap any bulk macro run with Application.ScreenUpdating = False and Application.Calculation = xlCalculationManual, restoring both afterwards. Second, for a one-off conversion of a large column, don't use a live formula at all — convert once and paste the results as values. For that, the bulk converter takes a pasted column or a CSV and hands back the words with no macro and no recalculation cost.

If you only need it once. Setting up a macro for a single conversion job is overkill. Paste your numbers into the bulk tool, copy the words back, and skip the VBA entirely. For repeated use inside a sheet, the LAMBDA version is the cleanest long-term option.