In this article I will show you two quick and free ways to convert currency numbers into English words in Excel 2016, 2013 and other versions.
Microsoft Excel is a great program to calculate this and that. It was initially developed to process large data arrays. However, it also lets creating accounting records like invoices, evaluation or balance sheets quickly and effectively.
In more or less solid payment documents it is necessary to duplicate numeric values with their word form. It is much harder to falsify typed numbers than those written by hand. Some swindler can try to make 8000 out of 3000, while it is almost impossible to secretly replace "three" with "eight".
So what you need is not just convert numbers to words in Excel (Π΅.g. 123.45 to "one hundred and twenty three, forty five"), but spell out dollars and cents (Π΅.g. $29.95 as "twenty nine dollars and ninety nine cents" ), pounds and pence for GBP, euros and eurocents for EUR, etc.
Even Excel 2016 doesn't have a built-in tool for spelling numbers, not to mention earlier versions. But that is when Excel is really good. You can always improve its functionality using formulas in all their
combinations, VBA macros, or third-party add-ins.
Below you'll find two ways to convert numbers from figures to words
And, possibly, you may need to convert Words to Numbers in Excel
=text()
.
Please find the details in the article Ways to convert numbers to text in Excel.
As I have already mentioned, Microsoft didn't want to add a tool for this task. However, when they saw how many users needed it, they created and published the special VBA macro on their website. The macro does what its name SpellNumber suggests. All other macros I came across are based on the Microsoft code.
You can find the macro mentioned as "spellnumber formula". However, it is not a formula, but a macro function, or to be more precise Excel User defined function (UDF).
The spellnumber option is able to write dollars and cents. If you need a different currency, you can change "dollar" and "cent" with the name of your one.
If you are not a VBA savvy guy, below you will find a copy of the code. If you still don't want or haven't time to sort this out, please use this solution.
Option Explicit 'Main Function Function SpellNumber(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 " MyNumber = Trim(Str(MyNumber)) DecimalPlace = InStr(MyNumber, ".") If DecimalPlace > 0 Then Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _ "00", 2)) MyNumber = Trim(Left(MyNumber, DecimalPlace - 1)) End If Count = 1 Do While MyNumber <> "" Temp = GetHundreds(Right(MyNumber, 3)) If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars If Len(MyNumber) > 3 Then MyNumber = Left(MyNumber, Len(MyNumber) - 3) Else MyNumber = "" End If Count = Count + 1 Loop Select Case Dollars Case "" Dollars = "No Dollars" Case "One" Dollars = "One Dollar" Case Else Dollars = Dollars & " Dollars" End Select Select Case Cents Case "" Cents = " and No Cents" Case "One" Cents = " and One Cent" Case Else Cents = " and " & Cents & " Cents" End Select SpellNumber = Dollars & Cents End Function Function GetHundreds(ByVal MyNumber) Dim Result As String If Val(MyNumber) = 0 Then Exit Function MyNumber = Right("000" & MyNumber, 3) ' Convert the hundreds place. If Mid(MyNumber, 1, 1) <> "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " End If ' Convert the tens and ones place. If Mid(MyNumber, 2, 1) <> "0" Then Result = Result & GetTens(Mid(MyNumber, 2)) Else Result = Result & GetDigit(Mid(MyNumber, 3)) End If GetHundreds = Result End Function Function GetTens(TensText) Dim Result As String Result = "" ' Null out the temporary function value. If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19... Select Case Val(TensText) 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" Case Else End Select Else ' If value between 20-99... Select Case Val(Left(TensText, 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 " Case Else End Select Result = Result & GetDigit _ (Right(TensText, 1)) ' Retrieve ones place. End If GetTens = Result End Function Function GetDigit(Digit) Select Case Val(Digit) Case 1: GetDigit = "One" Case 2: GetDigit = "Two" Case 3: GetDigit = "Three" Case 4: GetDigit = "Four" Case 5: GetDigit = "Five" Case 6: GetDigit = "Six" Case 7: GetDigit = "Seven" Case 8: GetDigit = "Eight" Case 9: GetDigit = "Nine" Case Else: GetDigit = "" End Select End Function
You will need to resave your workbook. When you try to save the workbook with a macro you'll get the message "The following features cannot be saved in macro-free workbook"
Click No. When you see a new dialog, chose the Save as option. In the field "Save as type" pick the option "Excel macro-enabled workbook".
Now you can use the function SpellNumber in your Excel documents. Enter =SpellNumber(A2)
into the cell where you need to get the number written in words. Here A2 is the address of the cell with the number or amount.
Here you can see the result:
Voila!
If you need to convert the entire table, not just 1 cell, place your mouse cursor to the lower right corner of the cell with the formula until it turns into a small black cross:
Left-click and drag it across the column to fill in the formula. Release the button to see the results:
=SpellNumber(29.95)
(29.95 - without quotation marks and the Dollar sign).
First off, you must know VBA to modify the code according to your needs. It is necessary to paste the code for each workbook, where you plan to change it. Otherwise, you will need to create a template file with macros and configure Excel to load this file at each start.
The main disadvantage of using a macro is if you send the workbook to somebody else, this person will not see the text unless the macro is built into the workbook. And even if it's built-in, they will get an alert that there are macros in the workbook.
For active Excel users who need to quickly spell sums but don't want to learn VBA or other workarounds, one kind developer created a free add-in - POPUP SPELL NUMBER for Microsoft Excel
Besides being ready for use, the tool is really flexible in converting numbers. You can choose the text case of the result (lower case, Title Case, Sentence case, UPPER CASE ), also you can select how you want to see the fraction:
Feel free to explore its possibilities on the product's home page.
The author states that it's tested and works in Excel for Windows 2000, 2002(XP), 2003, 2007, 2010 (32-bit), and 2013 (32-bit) in MSI-based and Click-To-Run installations of Office 365 cloud-based services.
I hate to say that the add-in doesn't work with 64-bit versions of Excel 2010, 2013, 2007. And it is a considerable obstacle since these versions are becoming more and more popular. So lucky you are if you have Excel 32-bit :) Feel free to download the add-in and check it out.
If you are the one with Excel 64-bit like me, drop the author a line and ask him for a special version.
Frankly, I can't imagine why you may need it. Just in case... :)
It appears that Excel MVP, Jerry Latham, created such Excel User defined function (UDF) as WordsToDigits. It converts English words back to number.
You can download Jerry's WordsToDigits workbook to see the UDF code. Here you'll also find his examples of how to use the function.
You can see how the function works on the sheet "Sample Entries", where you will also be able to enter your own examples. If you plan to employ WordsToDigits in your documents, please be informed that this function has restrictions. For example, it doesn't recognize fractions entered in words. You will find all the details on the "Information" sheet.
438 responses to "Two best ways to convert numbers to words in Excel"
please provide sample video
Option Explicit
'Main Function
Function SpellNumber(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 "
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Dollars
Case ""
Dollars = "No Dollars"
Case "One"
Dollars = "One Dollar"
Case Else
Dollars = Dollars & " Dollars"
End Select
Select Case Cents
Case ""
Cents = " and No Cents"
Case "One"
Cents = " and One Cent"
Case Else
Cents = " and " & Cents & " Cents"
End Select
SpellNumber = Dollars & Cents
End Function
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
when i copy and paste this, it gives me errors, what am i doing wrong?
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Rupees, Paisa, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
Paisa = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Rupees
Case ""
Rupees = "No Rupees"
Case "One"
Rupees = "One Rupees"
Case Else
Rupees = Rupees & " Rupees"
End Select
Select Case Paisa
Case ""
Paisa = " and No Paisa"
Case "One"
Paisa = " and One Paisa"
Case Else
Paisa = " and " & Paisa & " Paisa"
End Select
SpellNumber = Rupees & Paisa
End Function
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
than save ur file
i use this code but not given result. massage come Privacy warning; This documents contains macros, Activex controls,XML expansion pack information, or web components. These may include personal information that can not be removed by the documents inspector.
how can i convert numbers to words for Peso
replace lng mam yung dollars nang pesos (control+h) tapos replace all lng..
dollars to pesos
dollar to peso
How about po yong 66.15 for example.
Sinasabi nya Sixty six pesos and Fourteen Cents lng. Paano po babaguhin para maging fifteen sya.
I keep getting a syntax error
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Dollars = Temp & Place(Count) & Dollars
Dear, this is to update you that the formula is not working perfectly. See the response that I am getting:->
For Kuwaiti Dinars
for KD 122.050 I got: One Hundred Twenty Two Kuwait Dinar and Five fils
the correct answer has to be: One Hundred Twenty Two Kuwait Dinar and Fifty fils
What to change now
look at the figure, it says .05 and not .50, the result is correct it seems the figure is point zero five, therefore the result should be five instead of fifty
the issue is to replace the separator from "." to "," in the number or in the formula from:
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
to:
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ",")
I am getting a value like this :Four Hundred Eighty Dollars and Seventy One Cents. Instead of Dollars I want to have it in Kuwaiti Dinars and fills.
Pls help me
I Was looking for him a lot, This formula hit is very good working on any Currency,
i am very happy thank you very much sir, Great job, May Allah bless you.πππππππππ
Assalam -o- Alaikum
My dear brother i want to convert a mathematical digits in english words without any currency like as
564 Five Hundred and Sixty Four
what i do now please help me as soon as possible
i have to prepare Result Cards
Wa Alaikum Assalam,
Dear Raja Zeeshan
Please in macro editor window press Ctrl+F , find Dollar and replace it with empty space . do it again for Dollars and similarly for Cent and cents respectively. I hope it will solve your problem.
This formula is very good working on any Currency..
Thank you Sir for sharing this formula. It's help me a lot! I really appreciate that. Thanks again.
help me naman po pano mag convert numbers to words sa excell for cheque please ..
Thank you for this.
However, this was noticed.
For example, i tried to spell 450,750.34
Four Hundred Fifty Thousand Seven Hundred Fifty Dollars and Thirty Four Cents
In my country, we spell like this
Four Hundred and Fifty Thousand, Seven Hundred and Fifty Dollars, Thirty Four Cents
Can you please help me tweak the VBA code to have this new result.
did u got that code? i need it too
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Rupees, Paisa, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
Paisa = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Rupees
Case ""
Rupees = "No Rupees"
Case "One"
Rupees = "One Dollar"
Case Else
Rupees = Rupees & " Rupees"
End Select
Select Case Paisa
Case ""
Paisa = " and No Paisa"
Case "One"
Paisa = " and One Cent"
Case Else
Paisa = " and " & Paisa & " Paisa"
End Select
SpellNumber = Rupees & Paisa
End Function
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
How can I download vba code to my phone?
i just want the wording not any currency. what should i do?
Thank you Bro....
Hi, can i have the code without dollars and cents, E.g.
Four Million Six Hundred Three Thousand Four Hundred Twenty Two
Hi,
Could you tell me the code where I can mention "and" before the last figures e.g. Rs 1,987,290 (Rupees one million nine Hundred eighty seven thousand two hundred and ninety only)
Thanks you very much....
SIMPLE, LOL, YOUR MACROS WORKED FIRST TIME, NO PROBLEMS, ONLY REQUEST IS FOR A CHANGE TO 00/00...01/00...03/00 AND SO ON INSTEAD OF CENTS, GOT YOURS TO WORK 00/00 AND 01/00 TO WORK, BUT AFTER THAT, ALL IS TEXT /00. SO I DELETED CENTS ALL TOGETHER TILL I GET THE CORRECT MACROS FOR THE OO/00 TO 99/00, PLEASE AND THANKS
I need the answer for this
Here is my solution in a shorter macro:
Function NumberToWords(ByVal StartNumber As Currency) As String
Dim Buffer As String
Dim Dollars
Dim Cents
Dim NumberofGroups
Dim NumberSegment
Dim Hundreds
Dim Tens
Dim Ones
GroupNames = Array("", "Thousand ", "Million ", "Billion ", "Trillion ")
OnesNames = Array("", "One ", "Two ", "Three ", "Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine ", "Ten ", "Eleven ", "Twelve ", "Thirteen ", "Fourteen ", "Fifteen ", "Sixteen ", "Seventeen ", "Eighteen ", "Nineteen ")
TensNames = Array("", "", "Twenty ", "Thirty ", "Fourty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
Dollars = Fix(StartNumber)
Cents = Fix(100 * (StartNumber - Fix(StartNumber)) + 0.5)
NumberofGroups = Fix((Log(Dollars) / Log(10)) / 3)
Dim i
For i = NumberofGroups To 0 Step -1
NumberSegment = Fix(Dollars / 10^ ^ (i * 3))
Hundreds = Fix(NumberSegment / 100)
Tens = Fix((NumberSegment - (Hundreds * 100)) / 10)
Ones = NumberSegment - (Hundreds * 100) - (Tens * 10)
If Hundreds > 0 Then
Buffer = Buffer + OnesNames(Hundreds) + "Hundred "
End If
If Tens > 0 Then
If Tens > 1 Then
Buffer = Buffer + TensNames(Tens) + OnesNames(Ones)
Else
Buffer = Buffer + OnesNames(Tens * 10 + Ones)
End If
Else
Buffer = Buffer + OnesNames(Ones)
End If
If NumberSegment > 0 Then
Buffer = Buffer + GroupNames(i)
End If
Dollars = Dollars - (NumberSegment * 10^ ^ (i * 3))
Next i
Buffer = Buffer + "and "
If Cents < 10 Then
Buffer = Buffer + "0"
End If
Buffer = Buffer + Trim(Str(Cents)) + "/100 *****************************************"
NumberToWords = Buffer
End Function
when i copy and paste this, it gives me errors, what am i doing wrong?
Hi, Can please I have the code without dollars and cents? thanks
Hey Mike!
do you get the code without dollars and cents
i also need this code
if you get this code please send me
i have really need this code
It working very well. Thank's
Thanks for authentic codes. It works where codes from Microsoft gave an error message.
Best wushes!
Regards,
Thank you for this wonderful Module. Take care.
tried it and it worked:
$866.96 Eight Hundred Sixty Six Dollars and Ninety Five Cents
$866.955 Eight Hundred Sixty Six Dollars and Ninety Five Cents
but it does not round up.
it is supposed to be :
Eight Hundred Sixty Six Dollars and Ninety Six Cents
Please advise.
please disregard the previous comment. the code is working fine.
i just need to use the roundup function in excel.
You are a genius, thank you, I had the exact same problem.
Hello. I am wanted to enter the numbers 1 - 4 in each individual cell in an entire column. Once i insert the number and push ENTER, i want a text to replace the number based on which text i attach to that number. For example. The text for 1 is "Shut", i insert one into the cell and hit enter and it changes the value 1 to "shut
thanks brother
Why do I keep on getting #Name? Send Help please
me too
How To convert 48000 RS in English word in M S Excle
Hi,
I need to convert a number with three digits after the decimal point, for example:
122,145 --> one hundred twenty two dollars one hundred forty five cents.
Thank you in advance.
Hi,I need the number without the code of dollers and cents,thanks
Hello, the code is great! I'm using to print checks, so I need to add the word "only" at the end of the spelled number (ie twenty one dollars only). How can I achieve this?
Hi,
I'd like to convert in this format
P151.50 = One Hundred Fifty-One & 50/100 only
Thanks,
UPDATE
I was able to solve this but works only on Windows 8, 8.1, & 10 Machines only
here is the code
Option Explicit
'****************' Main Function *'****************
Function SpellNumber(ByVal MyNumber)
Dim Pesos, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion " ' String representation of amount
MyNumber = Trim(Str(MyNumber)) ' Position of decimal place 0 if none
DecimalPlace = InStr(MyNumber, ".")
'Convert cents and set MyNumber to Peso amount
If DecimalPlace > 0 Then
Cents = Right(MyNumber, 2)
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Pesos = Temp & Place(Count) & Pesos
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Pesos
Case ""
Pesos = "No Pesos"
Case "One"
Pesos = "One Peso"
Case Else
Pesos = Pesos & " Pesos"
End Select
Select Case Cents
Case ""
Cents = " Only"
Case "1"
Cents = " & .1/100 Cent Only"
Case Else
Cents = " & " & (Cents) & "/100 Only"
End Select
SpellNumber = Pesos & Cents
End Function
'*******************************************
' Converts a number from 100-999 into text *
'*******************************************
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3) 'Convert the hundreds place
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
'Convert the tens and ones place
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
'*********************************************
' Converts a number from 10 to 99 into text. *
'*********************************************
Function GetTens(TensText)
Dim Result As String
Result = "" 'null out the temporary function value
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) 'Retrieve ones place
End If
GetTens = Result
End Function
'*******************************************
' Converts a number from 1 to 9 into text. *
'*******************************************
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
Sub test()
Dim number As Double
number = Range("A1").Value
Range("A2").Value = SpellNumber(number)
End Sub
Thank you :)
i tried to sample 123.50
result: One Hundred Twenty Three Pesos & .5/100 Only
instead of: One Hundred Twenty Three Pesos & 50/100 Only
Please help
dear sir,
what do if i want to spell a number in BTD ?
regard,
Dina Sarker
Tried solving this.
Amount : 46,728.32
But always appears as "Forty Six Thousand Seven Hundred Twenty Eight Pesos & Thirty Two/100 Only" instead of Forty Six Thousand Seven Hundred Twenty Eight Pesos & 32/100 Only
Thanks a lot. i edited the currency bit from Dollars to GHCedis & Pesewas and it worked great! so grateful.
Mate you are a genius - thanks a million
Mate you are a genius - thanks a million
i got an error. "Ambiguous name detected: SpellNumber" ..how i gonna solve this?
Thanks a lot
Please help me get the above coding for converting Rupees as value
done. Thank you so much
hai, i need to change the above coding to indian currency
hi guys
i cant use VBA in my company lap .
please help me to convert number to text in INR format only by suing any formulas without using macros
Thanks a lot for sharing formula. Amazing...
dear sir,
what do if i want to spell a number in rupees ?
regard,
saurav narvekar
It is very helpful for me. but some changes required.
if There is Multiple Decimals then how do we Convert calculation shows Wrong.
Example : 149.149 = Spellnumber(One Hundred Forty Nine Dollars and Fourteen Cents.
But it has to be fifteen Cents how to do it pls help.
Formula updated from Dollar to Rupees
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Rupees, Paisa, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
Paisa = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Rupees
Case ""
Rupees = "No Rupees"
Case "One"
Rupees = "One Dollar"
Case Else
Rupees = Rupees & " Rupees"
End Select
Select Case Paisa
Case ""
Paisa = " and No Paisa"
Case "One"
Paisa = " and One Cent"
Case Else
Paisa = " and " & Paisa & " Paisa"
End Select
SpellNumber = Rupees & Paisa
End Function
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
-------------------------------
Regards
Hey, thank you for the code. However, I am getting an error stating syntax error with Function SpellNumber(ByVal MyNumber) highlighted in yellow & Do while MyNumber"" highlighted too..
Please help!
Thanks. This works. But now the question is how to permanenelty add this formula in excel 2016 because I need this in many sheets and everytime i'm unable to add formula in excel.
can i get code in uae dhirham and fils
in exel cell my total amount that amound i want to convert
we require only mention in words, from any number for example
11,223,569 Eleven Million Two Hundred Twenty Three Thousand Five Hundred Sixty Nine Only
145,201 One Hundred Forty Five Thousand Two Hundred One Only
5,300 Five Thousand Three Hundred
Very Thanks
Akram Iqbal
This code is showing error for 100 crores it is showing 10 crores only
can i change the currency like its dollars so can i change to dirhams and the fonts too
For Dirhams and Fills; but not tested if every amount will work out fine.
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Dirhams, Fills, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' String representation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert Fills and set MyNumber to dirham amount.
If DecimalPlace > 0 Then
Fills = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Dirhams = Temp & Place(Count) & Dirhams
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Dirhams
Case ""
Dirhams = ""
Case "One"
Dirhams = "One Dirham"
Case Else
Dirhams = Dirhams & " Dirhams"
End Select
Select Case Fills
Case ""
Fills = ""
Case "One"
Fills = " and One Fills"
Case Else
Fills = " and " & Fills & " Fills"
End Select
SpellNumber = Dirhams & Fills
End Function
' Converts a number from 100-999 into text
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
' Converts a number from 10 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
How to write formula for
45556.545
Forty Five Thousand Five Hundred Fifty six JOD and five hundred forty five fils
Please help me.
28,205.8
I dont want to show in word in Paisa.
Now showing
4567.23= Taka Four Thousand Five hundred Sixty Seven twenty three paise only.
But I want to show Like this:
4567.23= Taka Four Thousand Five hundred Sixty Seven only.
Please help me:
Function SpellNumber(amt As Variant) As Variant
Dim FIGURE As Variant
Dim LENFIG As Integer
Dim i As Integer
Dim WORDs(19) As String
Dim tens(9) As String
WORDs(1) = "One"
WORDs(2) = "Two"
WORDs(3) = "Three"
WORDs(4) = "Four"
WORDs(5) = "Five"
WORDs(6) = "Six"
WORDs(7) = "Seven"
WORDs(8) = "Eight"
WORDs(9) = "Nine"
WORDs(10) = "Ten"
WORDs(11) = "Eleven "
WORDs(12) = "Twelve "
WORDs(13) = "Thirteen "
WORDs(14) = "Fourteen "
WORDs(15) = "Fifteen "
WORDs(16) = "Sixteen "
WORDs(17) = "Seventeen "
WORDs(18) = "Eighteen "
WORDs(19) = "Nineteen "
tens(2) = "Twenty "
tens(3) = "Thirty "
tens(4) = "Fourty "
tens(5) = "Fifty "
tens(6) = "Sixty "
tens(7) = "Seventy "
tens(8) = "Eighty "
tens(9) = "Ninety "
FIGURE = amt
FIGURE = Format(FIGURE, "FIXED")
FIGLEN = Len(FIGURE)
If FIGLEN 1 Then
SpellNumber = "Taka "
ElseIf Val(Left(FIGURE, 9)) = 1 Then
SpellNumber = "Taka "
End If
For i = 1 To 3
If Val(Left(FIGURE, 2)) 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If
If i = 1 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & " Crore "
ElseIf i = 2 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & " Lakh "
ElseIf i = 3 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & " Thousand "
End If
FIGURE = Mid(FIGURE, 3)
Next i
If Val(Left(FIGURE, 1)) > 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 1))) + " Hundred "
End If
FIGURE = Mid(FIGURE, 2)
If Val(Left(FIGURE, 2)) 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If
FIGURE = Mid(FIGURE, 4)
If Val(FIGURE) > 0 Then
SpellNumber = SpellNumber & " Paise "
If Val(Left(FIGURE, 2)) 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If
End If
FIGURE = amt
FIGURE = Format(FIGURE, "FIXED")
If Val(FIGURE) > 0 Then
SpellNumber = SpellNumber & " Only. "
End If
End Function
I would like this one for Bahraini Dinar..as the whole process and change the currency there will be always an error. please help me on this...
Thank you for this. But how to do it like this: 190708 turn to (One-Nine-Zero-Seven-Zero-Eight)
Is there a way to do it like that? Thank you very much!
currently we are using spellnumber like this.
370,932.04 = Three Hundred Seventy Thousand Nine Hundred Thirty Two & 4/100 Pesos Only
But due to bank requirement it should be like this.
Three Hundred Seventy Thousand Nine Hundred Thirty Two & 04/100 Pesos Only
Please help me how to do it. Thanks in advance
Hi can anyone share me the excel add-in file of the Spell Number in USD? i cannot fine the excel Add-in File.
do you have the VBA code to convert numbers in French words
can you remove the . before the cents and add a zero? eg. .1/100 Only to 10/100 Only
HOW TO MAKE IT APPLY ON EVERY EXCEL SHEET
Convert
1.Four thousand three hundred and thirty to number figures
2.Three thousand and eighteen to number figures
3.Eight thousand and forty three to number figures
4.Nine thousand and seventy seven to number figures.
Convert
5. 9,44 to English words
6. 2,019 to English words
7. 7,003 to English words
Thanks.
Function SpellNumber(ByVal MyNumber) - -During running the formula , error occurs in MyNumber
Hi sir!
Good pm
Ask ko po sana pano po iconvert numbers to peso in excel 2016 windows 10.using this format po: ex.: 120.50
One Hundred Twenty Pesos and 50/100 Only
Thanks Sir! GOD BLESS
what if i want to convert the numbers only without currency like "dollars" what will be the code?
how to convert marks in words up to 100 only.
please worte a link to this mail
How can we convert current on three decimal places in words
For example 1,000.500 (One thousand ruppes and five hundred bz
perfect.
i want to write number in word pnly
Can you please help the exact keyword for peso?
Hi Experts,
Kindly update the macro for 3 decimal points.(100.250 ie One hundred and two fifty only).
Thanks in advance
I want to SpellNumber as US Dollar One Thousand Four Hundred and Twenty Five and Cents 24 Only for 1,425.24. Please help me.
Dear Experts,
I need a to convert like this
OMR 525,450.250
Omani Rial Five Hundred Twenty Five Thousand Four Hundred Fifty and Baizas Two Hundred Fifty Only
Kindly provide me the solution.
Avinash
I want to publish as Dirhams and Fils instead of Dollars and Cents.
kindly help me.
Option Explicit
'Main Function
Function SpellNumber(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 "
' String representation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert cents and set MyNumber to dollar amount.
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Dollars
Case ""
Dollars = "No Dollars"
Case "One"
Dollars = "One Dollar"
Case Else
Dollars = Dollars & " Dollars"
End Select
Select Case Cents
Case ""
Cents = " and No Cents"
Case "One"
Cents = " and One Cent"
Case Else
Cents = " and " & Cents & " Cents"
End Select
SpellNumber = Dollars & Cents
End Function
' Converts a number from 100-999 into text
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
' Converts a number from 10 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
Hi, I need this code for windows 10/Excel 365 in both Euro and Dollars. The one provided on the website doesn't work... it highlights Function SpellNumber(ByVal MyNumber) and errors. Either with #VALUE or just shows the formula. Can someone please help?
Thank you so much :), It works perfectly
Can you send the formula as per given below: 1500.250
"One Thousand Five Hundred And Baisa 250/1000 Only
How to write formula for
2675.20
TWO THOUSAND SIX HUNDRED SEVENTY FIVE AND CENTS TWENTY ONLY
Please help me.
Hello,
When I am converting Excel File into PDF its now showing Amount in words its showing #NAME?
How do this applicable for all new sheets?
Do i need to copy this entire code into all the new sheets every time, in case if i want to use this function?
Thanks!
Can you send the formula as per given below: 1500.250
"One Thousand Five Hundred And Baisa 250/1000 Only
I want Indian Rupees Conversation Code
currently we are using spellnumber like this.
370,932.04 = Three Hundred Seventy Thousand Nine Hundred Thirty Two & Paiase Four Only
But i required it should be like this.
Three Lakh Seventy Thousand Nine Hundred Thirty Two & Paiase Four Only
Please help me how to do it. Thanks in advance
Hello Rajesh!
I need more details to help you. Please let me know what formula you are using at the moment and whether you would like to get a number value or a text one. I will try to help you.
I follow all steps twice but its not work?
Hello Mohamad!
I canβt guess what you really did. What exactly doesnβt work? For me to be able to help you better, please describe your task in more detail. Itβll help me understand it better and find a solution for you. Thank you.
Kindly Help me to retrieve the value mentioned below
The formulae is working fine....
if the amount is in Lakhs like 318,600.00
So it shows the amount in Three Hundred Eighteen Thousand Six Hundred and Zero Piase(INR) Only
I want the result in One Lakh Eighteen Thousand Thousand Six Hundred and Zero Paise Only.
What changes in the equation formulae in spell number required.
Hi,
I have tried the code and its great.
I would like to use it for Kuwait dinar and need to convert 2 decimal places to 3 decimal places.
Example:
now : 5.5 gives - Five dollars and fifty fils
I need : 5.5 gives - five dollars and five hundred fils
Please help
Thank you in advance
Regards,
Amal
hello Amal!
Iβm sorry but your task is not entirely clear to me. Could you please describe it in more detail? Also write what exactly you want to receive. Text or number? What formula are you using now? I will try to help you.
The formula is working fro just one sheet in the whole workbook. how do i make it work on other sheets without having to retype the formula each time
All- I want in this way can someone help- "Rupees Seven Thousand seven Hundred Only" or "INR Seven Thousand Seven Hundred only"
Hello Ravneet!
Iβm sorry but your task is not entirely clear to me.
For me to be able to help you better, please describe your task in more detail. Please let me know in more detail what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result. Itβll help me understand it better and find a solution for you. Thank you.
First of all- thank you so much for replying.
Currently I have the Value in my Cell A1- "71,000"
Spell Check using the above number " Seventy one Thousand Rupees and No Paise"
I want this desired result to be " Rupees Seventy One Thousand Only"
The module I have used is as below.
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Rupees, Paise, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' String representation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert Paise and set MyNumber to dollar amount.
If DecimalPlace > 0 Then
Paise = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Rupees
Case ""
Rupees = "No Rupees"
Case "One"
Rupees = "One Dollar"
Case Else
Rupees = Rupees & " Rupees"
End Select
Select Case Paise
Case ""
Paise = " and No Paise"
Case "One"
Paise = " and One Cent"
Case Else
Paise = " and " & Paise & " Paise"
End Select
SpellNumber = Rupees & Paise
End Function
' Converts a number from 100-999 into text
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
' Converts a number from 10 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
thank you this is great
This is good, but how it is write with CAPS?
Thank You. It worked perfectly for me.
DEAR CONCERN,
JUST LET ME KNOW THE BELOW IN WORD DETAILS:
$ 2500.23456
In words: ?
Hi,
i tried, but could not get through.
Numbers: 199600 / 1136540
To be converted to: Rupees One lakh ninety nine thousand six hundred only. / Rupees Eleven lakh thirty six thousand five hundred fourty only.
Can any one please help?
Hello Every One
Good day,
I'm using below code for last 5 years and today I discovered that there is small error.
When I write minus -10,000 it shows on "Only Hundred Ten Thousand"
When I write minus +10,000 it shows on "Only Ten Thousand"
Please correct my formula I attached my excel sheet.
Below example:
(10,000.99) Only Hundred Ten Thousand & 99/100 Riyals
10,000.99 Only Ten Thousand & 99/100 Riyals
(10,000,000.99) Only Hundred Ten Million & 99/100 Riyals
10,000,000.99 Only Ten Million & 99/100 Riyals
(10,000,000,000.99) Only Hundred Ten Billion & 99/100 Riyals
10,000,000,000.99 Only Ten Billion & 99/100 Riyals
(10,000,000,000,000.90) Only Hundred Ten Trillion & 90/100 Riyals
10,000,000,000,000.90 Only Ten Trillion & 90/100 Riyals
Formula =spellbilling
MY VBA CODE:
'Main Function
Function SpellBilling(ByVal MyNumber)
Dim Riyals, Halalas, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' String representation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert Halalas and set MyNumber to Riyal amount.
If DecimalPlace > 0 Then
Halalas = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Riyals = Temp & Place(Count) & Riyals
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Riyals
Case ""
Riyals = "No Riyal"
Case "One"
Riyals = "Only One Riyal"
Case Else
Riyals = "Only " & Riyals
Riyals = Riyals & ""
End Select
Select Case Halalas
Case ""
Halalas = " & 00/00 Riyals"
Case "One"
Halalas = " & 01/100 Riyals"
Case "Two"
Halalas = " & 02/100 Riyals"
Case "Three"
Halalas = " & 03/100 Riyals"
Case "Four"
Halalas = " & 04/100 Riyals"
Case "Five"
Halalas = " & 05/100 Riyals"
Case "Six"
Halalas = " & 06/100 Riyals"
Case "Seven"
Halalas = " & 07/100 Riyals"
Case "Eight"
Halalas = " & 08/100 Riyals"
Case "Nine"
Halalas = " & 09/100 Riyals"
Case "Ten"
Halalas = " & 10/100 Riyals"
Case "Eleven"
Halalas = " & 11/100 Riyals"
Case "Twelve"
Halalas = " & 12/100 Riyals"
Case "Thirteen"
Halalas = " & 13/100 Riyals"
Case "Fourteen"
Halalas = " & 14/100 Riyals"
Case "Fifteen"
Halalas = " & 15/100 Riyals"
Case "Sixteen"
Halalas = " & 16/100 Riyals"
Case "Seventeen"
Halalas = " & 17/100 Riyals"
Case "Eighteen"
Halalas = " & 18/100 Riyals"
Case "Nineteen"
Halalas = " & 19/100 Riyals"
Case "Twenty "
Halalas = " & 20/100 Riyals"
Case "Twenty One"
Halalas = " & 21/100 Riyals"
Case "Twenty Two"
Halalas = " & 22/100 Riyals"
Case "Twenty Three"
Halalas = " & 23/100 Riyals"
Case "Twenty Four"
Halalas = " & 24/100 Riyals"
Case "Twenty Five"
Halalas = " & 25/100 Riyals"
Case "Twenty Six"
Halalas = " & 26/100 Riyals"
Case "Twenty Seven"
Halalas = " & 27/100 Riyals"
Case "Twenty Eight"
Halalas = " & 28/100 Riyals"
Case "Twenty Nine"
Halalas = " & 29/100 Riyals"
Case "Thirty "
Halalas = " & 30/100 Riyals"
Case "Thirty One"
Halalas = " & 31/100 Riyals"
Case "Thirty Two"
Halalas = " & 32/100 Riyals"
Case "Thirty Three"
Halalas = " & 33/100 Riyals"
Case "Thirty Four"
Halalas = " & 34/100 Riyals"
Case "Thirty Five"
Halalas = " & 35/100 Riyals"
Case "Thirty Six"
Halalas = " & 36/100 Riyals"
Case "Thirty Seven"
Halalas = " & 37/100 Riyals"
Case "Thirty Eight"
Halalas = " & 38/100 Riyals"
Case "Thirty Nine"
Halalas = " & 39/100 Riyals"
Case "Forty "
Halalas = " & 40/100 Riyals"
Case "Forty One"
Halalas = " & 41/100 Riyals"
Case "Forty Two"
Halalas = " & 42/100 Riyals"
Case "Forty Three"
Halalas = " & 43/100 Riyals"
Case "Forty Four"
Halalas = " & 44/100 Riyals"
Case "Forty Five"
Halalas = " & 45/100 Riyals"
Case "Forty Six"
Halalas = " & 46/100 Riyals"
Case "Forty Seven"
Halalas = " & 47/100 Riyals"
Case "Forty Eight"
Halalas = " & 48/100 Riyals"
Case "Forty Nine"
Halalas = " & 49/100 Riyals"
Case "Fifty "
Halalas = " & 50/100 Riyals"
Case "Fifty One"
Halalas = " & 51/100 Riyals"
Case "Fifty Two"
Halalas = " & 52/100 Riyals"
Case "Fifty Three"
Halalas = " & 53/100 Riyals"
Case "Fifty Four"
Halalas = " & 54/100 Riyals"
Case "Fifty Five"
Halalas = " & 55/100 Riyals"
Case "Fifty Six"
Halalas = " & 56/100 Riyals"
Case "Fifty Seven"
Halalas = " & 57/100 Riyals"
Case "Fifty Eight"
Halalas = " & 58/100 Riyals"
Case "Fifty Nine"
Halalas = " & 59/100 Riyals"
Case "Sixty "
Halalas = " & 60/100 Riyals"
Case "Sixty One"
Halalas = " & 61/100 Riyals"
Case "Sixty Two"
Halalas = " & 62/100 Riyals"
Case "Sixty Three"
Halalas = " & 63/100 Riyals"
Case "Sixty Four"
Halalas = " & 64/100 Riyals"
Case "Sixty Five"
Halalas = " & 65/100 Riyals"
Case "Sixty Six"
Halalas = " & 66/100 Riyals"
Case "Sixty Seven"
Halalas = " & 67/100 Riyals"
Case "Sixty Eight"
Halalas = " & 68/100 Riyals"
Case "Sixty Nine"
Halalas = " & 69/100 Riyals"
Case "Seventy "
Halalas = " & 70/100 Riyals"
Case "Seventy One"
Halalas = " & 71/100 Riyals"
Case "Seventy Two"
Halalas = " & 72/100 Riyals"
Case "Seventy Three"
Halalas = " & 73/100 Riyals"
Case "Seventy Four"
Halalas = " & 74/100 Riyals"
Case "Seventy Five"
Halalas = " & 75/100 Riyals"
Case "Seventy Six"
Halalas = " & 76/100 Riyals"
Case "Seventy Seven"
Halalas = " & 77/100 Riyals"
Case "Seventy Eight"
Halalas = " & 78/100 Riyals"
Case "Seventy Nine"
Halalas = " & 79/100 Riyals"
Case "Eighty "
Halalas = " & 80/100 Riyals"
Case "Eighty One"
Halalas = " & 81/100 Riyals"
Case "Eighty Two"
Halalas = " & 82/100 Riyals"
Case "Eighty Three"
Halalas = " & 83/100 Riyals"
Case "Eighty Four"
Halalas = " & 84/100 Riyals"
Case "Eighty Five"
Halalas = " & 85/100 Riyals"
Case "Eighty Six"
Halalas = " & 86/100 Riyals"
Case "Eighty Seven"
Halalas = " & 87/100 Riyals"
Case "Eighty Eight"
Halalas = " & 88/100 Riyals"
Case "Eighty Nine"
Halalas = " & 89/100 Riyals"
Case "Ninety "
Halalas = " & 90/100 Riyals"
Case "Ninety One"
Halalas = " & 91/100 Riyals"
Case "Ninety Two"
Halalas = " & 92/100 Riyals"
Case "Ninety Three"
Halalas = " & 93/100 Riyals"
Case "Ninety Four"
Halalas = " & 94/100 Riyals"
Case "Ninety Five"
Halalas = " & 95/100 Riyals"
Case "Ninety Six"
Halalas = " & 96/100 Riyals"
Case "Ninety Seven"
Halalas = " & 97/100 Riyals"
Case "Ninety Eight"
Halalas = " & 98/100 Riyals"
Case "Ninety Nine"
Halalas = " & 99/100 Riyals"
Case Else
Halalas = " & " & Halalas & " Halalas"
End Select
SpellBilling = Riyals & Halalas
End Function
' Converts a number from 100-999 into text
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
' Converts a number from 10 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
i will like to know how to get the currency in Ghana cedis and peswas. the currency input in the formula is dollars. kindly help me.
Can you send the formula as per given below: 1501.250
"One Thousand Five Hundred One And Baisa 250/1000 Only
Thank you!!! it worked for me..
Hi, need help like as below :
294,922.30
Two Hundred Ninety Four Thousand Nine Hundred Twenty Two And Cent Thirty only
have any code for this?
help help help & thank you so much...huhu...
Hi, Thanks for the code.
When i use the formula for 100.50 it shows "One Hundred Dollars and Fifty Cents"
Where as i want it to show as " Dollars One Hundred and Cents Fifty Only"
In Which Dollars & Cents to be shown before the numbers & Only to be shown at the end.
Please let me know what i need to change in the code to get the above result.
Thanks & regards,
Hello, Please i need some orientation on the said codes presented above. when i follow the procedure shown above the result i get after gibing the spellnumber command is #NAME? Please how should i proceed with such result.
Please help me. Thanks
Hello!
Please describe in more detail your actions. Have you installed VBA macro via Alt + F11?
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Dhirams, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp "" Then Dhirams = Temp & Place(Count) & Dhirams
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Dhirams
Case ""
Dhirams = "No Dhirams"
Case "One"
Dhirams = "One Dhirams"
Case Else
Dhirams = Dhirams & " Dhirams"
End Select
Select Case Cents
Case ""
Cents = " and No Cents"
Case "One"
Cents = " and One Cent"
Case Else
Cents = " and " & Cents & " Cents"
End Select
SpellNumber = Dhirams & Cents
End Function
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
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"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 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 "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function