The code is pasted, the formula is typed exactly right - and the cell answers with a cold #NAME?. Before you doubt the code, doubt its address. In Excel, where VBA code lives decides whether a formula is allowed to use it at all.
This error has a reputation for wasting afternoons, because everything looks correct. The code is present, the spelling matches - and yet. Work through this page in order: what the error means, the one placement mistake behind most cases, the two-minute move, and the short checklist for the rest.
The NAME error usually means the function exists - just in a place worksheet formulas are not allowed to look.
#NAME? is Excel saying: I do not know anything with that name. The formula is typed fine. The amount is fine. Excel simply cannot find a function called SPELLNUMBER available to this workbook.
That narrows the cause to a short list: the code is in the wrong place, the code is switched off, or the code is in a different file from the one you are looking at. Nine times out of ten it is the first one.
Open the VBA editor with Alt + F11 and look at the tree on the left. Every sheet has its own code window, and double-clicking Sheet1 opens it invitingly - so that is where most people paste.
Code in a sheet's window belongs to that sheet's private events. Worksheet formulas are not allowed to call functions from there - nor from the ThisWorkbook window. A custom function becomes a real Excel function only when it lives in a standard module: a module you add yourself with Insert then Module. Same code, same file - one window works, the other silently does not.
Proof you did it right: press Shift + F3 (Insert Function), choose the User Defined category - SpellNumber is listed there when Excel can truly see it.
Work down this short list:
See the file downloaded, the add-in switched on and the formula typed live - the complete method in about a minute.
Watch Full VideoSomething removed or disconnected the code between then and now: the file was saved as .xlsx which strips code, the add-in was unticked or its file moved, or the workbook was opened with macros blocked. Check in that order - format, add-in tick, security bar - before touching the code itself.
Because the editor shows every window in the file, including sheet modules and ThisWorkbook, and functions in those windows are private to them. Formulas can only call functions in a standard module - the kind added with Insert then Module. Move the code there and the same formula works unchanged.
Yes. Once the code sits in a standard module (or the add-in is ticked), SpellNumber appears in the Insert Function dialog under the User Defined category, and typing =Spell offers it in autocomplete. If it is missing from both places, Excel has not loaded it - placement, add-in tick or macro security is the reason.