I want to convert a number (say 123) to One Two Three , not One Hundred and Twenty Three.
I want it like this: (example)
10 = One Zero
5 = Five
87 = Eight Seven
Could not find any code on internet.
Please help.
I want to convert a number (say 123) to One Two Three , not One Hundred and Twenty Three.
I want it like this: (example)
10 = One Zero
5 = Five
87 = Eight Seven
Could not find any code on internet.
Please help.
You can use this UDF like any other formula
Formula:Please Login or Register to view this content.
NumbersAsWords.jpg
Place in a STANDARD module
Can also call from VBA like thisPlease Login or Register to view this content.
NumbersAsWordsVBA.jpgPlease Login or Register to view this content.
Last edited by kev_; 02-25-2018 at 01:07 PM.
Click *Add Reputation to thank those who helped you. Ask if anything is not clear
This is exactly what i want it...
Thank you so much
Hi kev_,
I have some problem on using your code. I am using office 2007 and the code for standardmodule
This code/function doesn't showup like other formulas when i type it. I have to type the whole words =NumberAsWords.
Can i just rename the word "NumbersAsWords" in the code as "NasW" so that i have to type less when using it.
What i want is when i type =Num, it should display this formula "=NumbersAsWords()" so that i can just click it to use it. Is it possible?
- that is exactly what it does for me with 2016 (2007 behaves differently )What i want is when i type =Num, it should display this formula "=NumbersAsWords()" so that i can just click it to use it. Is it possible?
NumbersAsWords2.jpg
Try renaming it Public Function NumbersAsWords(numbers As String)
- I do not know if it will help
- I cannot test on 2007
- YES (you can use any name that is not the same as Excel is using for something else)Can i just rename the word "NumbersAsWords" in the code as "NasW" so that i have to type less when using it
At first, i thought the add-ins (your code) does not even load up. I want the way it is shown in your excel 2016, maybe not possible in 2007. But, it should be possible...)
What i did:
1. Open vb window (alt+f11)
2. Insert new module
3. Copy paste your code (to be used in standard module)
4. Save it as excel add-ins format inside office add-ins folder "C:\Users\*\AppData\Roaming\Microsoft\Add-Ins"
5. close vb window and excel
6. open excel and activate the add-ins
I think i have done correctly. (I am not sure in what format to be saved as. Excel add-ins or Excel macro-enabled or any other format)
I'll try to figure it out, and if i can't, i'll just rename it
Thank you so much
Did you try my suggestion?
- rename Public Function NumbersAsWords(numbers As String)
Oh, I haven't tried that.
I'll be able to test it by Monday only. By then, i'll tell you the result.
Thank you
Just tested it in 2007 and it behaves like any other function.
When I start typing =nu the function already appears in the list.
Just doubleclick it, select cell, close brackets, enter and finished.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
Thanks for testing it for me bakerman2
Again, thanks to kev_
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks