Forum Home
Press F1
 
Thread ID: 50150 2004-10-11 23:55:00 Excel: convert number to equivalent word Tinakarori (2162) Press F1
Post ID Timestamp Content User
280388 2004-10-11 23:55:00 Can anyone advise of a function or formula in Excel XP that will automatically provide the word equivalent of a number?

For example, if the number "1" is entered in the reference cell, the output cell displays "one"

I'm sure I read about a way to do this not long ago, in the context of an automatic cheque-writing process in Excel.
Tinakarori (2162)
280389 2004-10-12 00:10:00 This is the ms page for it here (support.microsoft.com)
hth
johnboy (217)
280390 2004-10-12 01:14:00 Many thanks Johnboy

I've printed the MS K_base article, and will now dive into implementing the VBA module in a sample spreadsheet.
Tinakarori (2162)
280391 2004-10-12 02:22:00 I tried it and it worked great.

I wonder how one can save it as a function that will work on any spreadsheet?
B.M. (505)
280392 2004-10-12 03:27:00 > I tried it and it worked great.
>
> I wonder how one can save it as a function that will
> work on any spreadsheet?

Save it in your Personal.xls file. If you dont have one, you can create a file with this name and save in your XlStart folder (wherever Office is installed) or record a new macro (Tools|Macro|Record New macro) and in the drop down where it has 'Store Macro In' choose 'Personal Macro Workbook', click Ok then stop the macro. The Personal.xls file will be created if it didnt already exist.

Open the Personal.xls file (note it is a hidden file) in the xlstart folder then open the VBE (ALT+F11) then insert a new module (Insert|Module) and paste the function code in there. Save and close Personal.xls file.

hth
parry (27)
280393 2004-10-12 03:30:00 Forgot to say if a module doesnt already exist create one. Otherwise just paste underneath the rest of the code you have in there (if any).

hth
parry (27)
280394 2004-10-12 07:35:00 Thanks Parry, I'll give it a go tomorrow.

Cheers

Bob
B.M. (505)
280395 2004-10-12 20:35:00 Followed your instructions Parry and everything worked fine but only on that workbook.

I’d like to be able to add it to the function list so it will work on existing workbooks.

Is that possible?

Cheers

Bob
B.M. (505)
280396 2004-10-12 22:10:00 Hi BM, my apologies this didnt work as I expected. You will need to preceed the function name with Personal.xls! for it to work. I didn't think you would have to reference this book.

eg...
=PERSONAL.XLS!spellnumber(123.45)

Just some background on this. When Excel starts it loads all add-ins and all workbooks located in the xlstart folder so any procedures/functions in these areas are available to all workbooks.

If the function was saved as an Add-in then you dont need to preceed the function with the name of the workbook in order for Excel to be able to locate the function, but it seems you do for xlstart files.
parry (27)
280397 2004-10-12 22:33:00 Sorry Parry, that returned #NAME?

Never mind, just thought it would be nice to add it to the dozens of other functions that already exist.

Cheers

Bob
B.M. (505)
1 2