Comments on: Two best ways to convert numbers to words in Excel

In this article I will show you two quick and free ways to convert currency numbers into English words in Excel 2019, 2016, 2013 and other versions. Continue reading

Comments page 3. Total comments: 538

  1. dears,

    please need this macro without currency :)

    thanks

  2. Hi mine is working perfectly! thank you
    but having issue sometime (Seventeen Dollars and Thirty Two Cents) but excel numeric digit show 17.33 anyone help me to find the solution or having only option to change the decimal places 2 to 3

    1. Hello!
      Your number is the result of a calculation. If you increase the number of visible decimal places in the cell, you will see 17.3268 or something similar. Excel automatically rounds the number it shows you on the worksheet. But the value in the cell does not change. The SpellNumber function does not round a number. To make the data match, use the ROUND function in your formula.

      1. Sir Alexander Trifuntov

        Please help me on this I am using the below VBA code as a result I get the word "Rupees" at the beginning of the result and the word "Only" at the end.

        Example
        123
        =Spell Number(One Hundred and Twenty Three )
        Need Result
        Rupees One Hundred and Twenty Three Only

        (Using Below Code)

        Option Explicit
        Function SpellNumber(ByVal MyNumber)
        Dim uStr As String
        Dim uFNum As Integer
        Dim uStrPoint
        Dim uStrNumber
        Dim uPoint As String
        Dim uNumber As String
        Dim uP() As Variant
        Dim uDP
        Dim uCnt As Integer
        Dim uResult, uT As String
        Dim uLen As Integer
        On Error Resume Next
        uP = Array("", "Thousand ", "Million ", "Billion ", "Trillion ", " ", " ", " ", " ")
        uNumber = Trim(Str(MyNumber))
        uDP = InStr(uNumber, ".")
        uPoint = ""
        uStrNumber = ""
        If uDP > 0 Then
        uPoint = " point "
        uStr = Mid(uNumber, uDP + 1)
        uStrPoint = Left(uStr, Len(uNumber) - uDP)
        For uFNum = 1 To Len(uStrPoint)
        uStr = Mid(uStrPoint, uFNum, 1)
        uPoint = uPoint & Digits(uStr) & " "
        Next uFNum
        uNumber = Trim(Left(uNumber, uDP - 1))
        End If
        uCnt = 0
        uResult = ""
        uT = ""
        uLen = 0
        uLen = Int(Len(Str(uNumber)) / 3)
        If (Len(Str(uNumber)) Mod 3) = 0 Then uLen = uLen - 1
        Do While uNumber ""
        If uLen = uCnt Then
        uT = HundredsDigits(Right(uNumber, 3), False)
        Else
        If uCnt = 0 Then
        uT = HundredsDigits(Right(uNumber, 3), True)
        Else
        uT = HundredsDigits(Right(uNumber, 3), False)
        End If
        End If
        If uT "" Then
        uResult = uT & uP(uCnt) & uResult
        End If
        If Len(uNumber) > 3 Then
        uNumber = Left(uNumber, Len(uNumber) - 3)
        Else
        uNumber = ""
        End If
        uCnt = uCnt + 1
        Loop
        uResult = uResult & uPoint
        SpellNumber = uResult
        End Function
        Function HundredsDigits(uHDgt, uB As Boolean)
        Dim uRStr As String
        Dim uStrNum As String
        Dim uStr As String
        Dim uI As Integer
        Dim uBB As Boolean
        uStrNum = uHDgt
        uRStr = ""
        On Error Resume Next
        uBB = True
        If Val(uStrNum) = 0 Then Exit Function
        uStrNum = Right("000" & uStrNum, 3)
        uStr = Mid(uStrNum, 1, 1)
        If uStr "0" Then
        uRStr = Digits(Mid(uStrNum, 1, 1)) & "Hundred "
        Else
        If uB Then
        uRStr = "and "
        uBB = False
        Else
        uRStr = " "
        uBB = False
        End If
        End If
        If Mid(uStrNum, 2, 2) "00" Then
        uRStr = uRStr & TenDigits(Mid(uStrNum, 2, 2), uBB)
        End If
        HundredsDigits = uRStr
        End Function
        Function TenDigits(uTDgt, uB As Boolean)
        Dim uStr As String
        Dim uI As Integer
        Dim uArr_1() As Variant
        Dim uArr_2() As Variant
        Dim uT As Boolean
        uArr_1 = Array("Ten ", "Eleven ", "Twelve ", "Thirteen ", "Fourteen ", "Fifteen ", "Sixteen ", "Seventeen ", "Eighteen ", "Nineteen ")
        uArr_2 = Array("", "", "Twenty ", "Thirty ", "Forty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
        uStr = ""
        uT = True
        On Error Resume Next
        If Val(Left(uTDgt, 1)) = 1 Then
        uI = Val(Right(uTDgt, 1))
        If uB Then uStr = "and "
        uStr = uStr & uArr_1(uI)
        Else
        uI = Val(Left(uTDgt, 1))
        If Val(Left(uTDgt, 1)) > 1 Then
        If uB Then uStr = "and "
        uStr = uStr & uArr_2(Val(Left(uTDgt, 1)))
        uT = False
        End If
        If uStr = "" Then
        If uB Then
        uStr = "and "
        End If
        End If
        If Right(uTDgt, 1) "0" Then
        uStr = uStr & Digits(Right(uTDgt, 1))
        End If
        End If
        TenDigits = uStr
        End Function
        Function Digits(uDgt)
        Dim uStr As String
        Dim uArr_1() As Variant
        uArr_1 = Array("Zero ", "One ", "Two ", "Three ", "Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine ")
        uStr = ""
        On Error Resume Next
        uStr = uArr_1(Val(uDgt))
        Digits = uStr
        End Function

  3. hello all genius,
    can anyone help me?

    100000 ... when i tried this code it is coming "one hundred thousand".

    i need it as "one lakh"/ or "Point million"

    how can i add this extra requirement??

  4. SO Helping ... Specially by pics....

  5. I don't know what to say. This worked for me like magic. I was looking for this for hours and at last, I found you. WOW! Let me salute you, Mr. Admin. Thank you very much.

  6. Please help me with the formula for shillings

  7. Hi there,

    As far as VBA is often disabled for security reasons, I have written the FORMULA which spells sums up to 999 billion dollars, e.g.:

    907 654 000 012,99
    nine hundred and seven billion six hundred and fifty four million twelve dollars and 99 cents

    The formula is sensitive to Zero thousands/mln/bln (omits thousands/mln/bln if they are 000)
    Also spells "dollar" or "dollars" depending if the last digit of dollars is 1 or more (21 dollar, and 17 dollars)

    Simply replace "A1" in tjhe code with the name of the cell you need (better with Ctrl-H)

    ---

    =CONCATENATE(IF(INT(A1/1000000000)>=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(A1/1000000000)>99;CONCATENATE(CHOOSE(INT(INT(A1/1000000000)/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(A1/1000000000)>100;MOD(INT(A1/1000000000);100)>0);"and ";"");IF(MOD(INT(A1/1000000000);100)=0;"";IF(MOD(INT(A1/1000000000);100)=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(MOD(A1;1000000000)/1000000)>99;CONCATENATE(CHOOSE(INT(INT(MOD(A1;1000000000)/1000000)/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(MOD(A1;1000000000)/1000000)>100;MOD(INT(MOD(A1;1000000000)/1000000);100)>0);"and ";"");IF(MOD(INT(MOD(A1;1000000000)/1000000);100)=0;"";IF(MOD(INT(MOD(A1;1000000000)/1000000);100)=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(MOD(A1;1000000)/1000)>99;CONCATENATE(CHOOSE(INT(INT(MOD(A1;1000000)/1000)/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(MOD(A1;1000000)/1000)>100;MOD(INT(MOD(A1;1000000)/1000);100)>0);"and ";"");IF(MOD(INT(MOD(A1;1000000)/1000);100)=0;"";IF(MOD(INT(MOD(A1;1000000)/1000);100)=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(MOD(A1;1000))>99;CONCATENATE(CHOOSE(INT(INT(MOD(A1;1000))/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(MOD(A1;1000))>100;MOD(INT(MOD(A1;1000));100)>0);"and ";"");IF(MOD(INT(MOD(A1;1000));100)=0;"";IF(MOD(INT(MOD(A1;1000));100)<20;CHOOSE(MOD(INT(MOD(A1;1000));100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine";"ten";"eleven";"twelve";"thirteen";"fourteen";"fifteen";"sixteen";"seventeen";"eighteen";"nineteen");CONCATENATE(CHOOSE(INT(MOD(INT(MOD(A1;1000));100)/10);"ERROR";"twenty";"thirty";"forty";"fifty";"sixty";"seventy";"eighty";"ninety";"MORE");CHOOSE(INT(MOD(INT(MOD(A1;1000));10))+1;"";" one";" two";" three";" four";" five";" six";" seven";" eight";" nine"))))));" ");"");IF(INT(MOD(A1;10))=1;"dollar and ";"dollars and ");ROUND(MOD(A1;1)*100;0);" cents")

    1. Sorry, the code somehow ripped.
      Write once more:

      =CONCATENATE(IF(INT(A1/1000000000)>=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(A1/1000000000)>99;CONCATENATE(CHOOSE(INT(INT(A1/1000000000)/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(A1/1000000000)>100;MOD(INT(A1/1000000000);100)>0);"and ";"");IF(MOD(INT(A1/1000000000);100)=0;"";IF(MOD(INT(A1/1000000000);100)=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(MOD(A1;1000000000)/1000000)>99;CONCATENATE(CHOOSE(INT(INT(MOD(A1;1000000000)/1000000)/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(MOD(A1;1000000000)/1000000)>100;MOD(INT(MOD(A1;1000000000)/1000000);100)>0);"and ";"");IF(MOD(INT(MOD(A1;1000000000)/1000000);100)=0;"";IF(MOD(INT(MOD(A1;1000000000)/1000000);100)=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(MOD(A1;1000000)/1000)>99;CONCATENATE(CHOOSE(INT(INT(MOD(A1;1000000)/1000)/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(MOD(A1;1000000)/1000)>100;MOD(INT(MOD(A1;1000000)/1000);100)>0);"and ";"");IF(MOD(INT(MOD(A1;1000000)/1000);100)=0;"";IF(MOD(INT(MOD(A1;1000000)/1000);100)=1;CONCATENATE(TRIM(CONCATENATE(IF(INT(MOD(A1;1000))>99;CONCATENATE(CHOOSE(INT(INT(MOD(A1;1000))/100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine");" hundred ");"");IF(AND(INT(MOD(A1;1000))>100;MOD(INT(MOD(A1;1000));100)>0);"and ";"");IF(MOD(INT(MOD(A1;1000));100)=0;"";IF(MOD(INT(MOD(A1;1000));100)<20;CHOOSE(MOD(INT(MOD(A1;1000));100);"one";"two";"three";"four";"five";"six";"seven";"eight";"nine";"ten";"eleven";"twelve";"thirteen";"fourteen";"fifteen";"sixteen";"seventeen";"eighteen";"nineteen");CONCATENATE(CHOOSE(INT(MOD(INT(MOD(A1;1000));100)/10);"ERROR";"twenty";"thirty";"forty";"fifty";"sixty";"seventy";"eighty";"ninety";"MORE");CHOOSE(INT(MOD(INT(MOD(A1;1000));10))+1;"";" one";" two";" three";" four";" five";" six";" seven";" eight";" nine"))))));" ");"");IF(INT(MOD(A1;10))=1;"dollar and ";"dollars and ");ROUND(MOD(A1;1)*100;0);" cents")

      1. sorry again, the code rips while publishing... half the text simply disappears :(

  8. Hi Friends,

    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)

  9. Hi,

    First of all thanks for the wonderful formulas. May I get the formula for UAE dirham and Indian Rupees as well

  10. Thanks from yours formula

  11. hi can you help me

    I want to convert amount like this;

    Php. 1,982.56

    one thousand nine hundred eighty two pesos & 56/100 only

  12. I'd like to convert the digits to words but without the "dollar or cents"
    i.e. 342,880 will be:
    "Three Hundred Forty Two Thousand Eight Hundred and Eighty"
    and not
    "Three Hundred Forty Two Thousand Eight Hundred Eighty Dollars and No Cents"

    how do I do that? thank you!

  13. Hi, Please insert INR in currency too.

  14. There's Error ????

    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

  15. Can any body help for Omani Rials Formulae, for digit to word conversion?
    I am trying to copy Bahraini Dinar formulae but getting syntax error : do while Mynumber " ".

    thanks

  16. For Bahrani dinar i'm getting error- compile error: syntax error. Do While MyNumber " "

    Please assist

  17. Hello Brother....

    I wanna change numbers to arabic text .... like this:

    40 will be اربعون

    can you help me please

  18. How about Philippine Peso? How can I Convert excel number to Word. Thank you

    1. Changes dollar words to Peso and Cents to Centavos.

  19. the debugging taking to long.

  20. It works...great...!!
    I just want small correction in the formula:

    When I am trying to convert Number 11726.27 it gives me the answer as:

    Eleven Thousand Seven Hundred Twenty Six Dollars and Twenty Seven Cents

    I need Dollars to be mention at the starting as well Cents to be mentioned at starting. i.e.
    USD Eleven Thousand Seven Hundred Twenty Six and Cents Twenty Seven only.

    Can I get the code for this? Please.

  21. how to set excel formulas number to word in lebanese pound only ?

  22. How can I change to Omani Riyal & Baise or no currency either one will be helpful.

    Thanks

  23. How can I change the Currency from Dollars to Kenya shillings. Is there a way when using visual basic

  24. Thanks, Worked perfectly

  25. MyNumber = Trim(Str(MyNumber))
    DecimalPlace = InStr(MyNumber, ".")
    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
    Do While MyNumber ""
    Temp = GetHundreds(Right(MyNumber, 2))
    If Temp "" Then Rupees = Temp & Place(Count) & Rupees
    If Len(MyNumber) > 2 Then
    MyNumber = Left(MyNumber, Len(MyNumber) - 2)
    Else
    MyNumber = ""
    End If
    Count = Count + 1
    Loop

    In this code something wrong where we use in Indian Currency there it should come as "one laksh twenty six thousand seven hundred rupees only" but the output is like
    "one hundred twenty six thousand seven hundred rupees only.

    where exactly the code has to change ... can anyone support me for clear the issue.

  26. 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) = " Lakh "
    Place(4) = " Crore "

    MyNumber = Trim(Str(MyNumber))
    DecimalPlace = InStr(MyNumber, ".")
    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
    Do While MyNumber ""
    Temp = GetHundreds(Right(MyNumber, 2))
    If Temp "" Then Rupees = Temp & Place(Count) & Rupees
    If Len(MyNumber) > 2 Then
    MyNumber = Left(MyNumber, Len(MyNumber) - 2)
    Else
    MyNumber = ""
    End If
    Count = Count + 1
    Loop

    Loop
    Select Case Rupees
    Case ""
    Rupees = ""
    Case "One"
    Rupees = "One Rupee"
    Case Else
    Rupees = Rupees & " Rupee"
    End Select
    Select Case Paise
    Case ""
    Paise = " Only"
    Case "One"
    Paise = " One Paise Only"

    Case Else
    Paise = " and " & Paise & " Paise Only"
    End Select
    SpellNumber = Rupees & Paise
    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

    In this code something wrong where we use in Indian Currency there it should come as "one laksh twenty six thousand seven hundred rupees only" but the output is like
    "one hundred twenty six thousand seven hundred rupees only.

    where exactly the code has to change ... can anyone support me for clear the issue.

  27. Hi

    how to set excel formulas number to word in Malaysia Ringgit.

    sample: RM 3181.60
    three thousand one hundred eighty one and cents sixty only

    sample: RM20.00
    twenty ringgit only

    (how to set?) please help to set this.

  28. it works only those files where I applied this code. but when I open another/new file it not works.

  29. Thank you. Very useful utility

  30. 3 Decimal.
    Bahraini Dinar

    Option Explicit
    'Main Function
    Function SpellNumber(ByVal MyNumber)
    Dim Dinar, fils, 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 Dinar amount.
    If DecimalPlace > 0 Then
    fils = GetHundreds(Left(Mid(MyNumber, DecimalPlace + 1) & _
    "000", 3))
    MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
    End If
    Count = 1
    Do While MyNumber ""
    Temp = GetHundreds(Right(MyNumber, 3))
    If Temp "" Then Dinar = Temp & Place(Count) & Dinar
    If Len(MyNumber) > 3 Then
    MyNumber = Left(MyNumber, Len(MyNumber) - 3)
    Else
    MyNumber = ""
    End If
    Count = Count + 1
    Loop
    Select Case Dinar
    Case ""
    Dinar = "No Dinar"
    Case "One"
    Dinar = "One Dinar"
    Case Else
    Dinar = Dinar & " Dinar"
    End Select
    Select Case fils
    Case ""
    fils = " and No fils"
    Case "One"
    fils = " and One fils"
    Case Else
    fils = " and " & fils & " fils"
    End Select
    SpellNumber = Dinar & fils
    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

    1. hi i cannot make it any one can help

    2. hi this is zaka working in Dubai, how i convert number to AED in excel
      my number is +971 555 246 286

  31. Sir,
    I Need a formulae for qty Incl Kgs, Ltrs and Nos & Amount all. Will you help me

  32. Hi

    how to set excel formulas number to word in Malaysia Ringgit.

    sample: RM 3181.6
    three thousand one hundred eighty one and cents sixty only (how to set?)

  33. How to set excel formulas number to word in a Malaysian Ringgit MYR?

  34. Hi Md.Delwar,

    Try this for indian rupees and paises:

    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) = " Lakh "
    Place(4) = " Crore "

    MyNumber = Trim(Str(MyNumber))
    DecimalPlace = InStr(MyNumber, ".")
    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
    Do While MyNumber ""
    Temp = GetHundreds(Right(MyNumber, 2))
    If Temp "" Then Rupees = Temp & Place(Count) & Rupees
    If Len(MyNumber) > 2 Then
    MyNumber = Left(MyNumber, Len(MyNumber) - 2)
    Else
    MyNumber = ""
    End If
    Count = Count + 1
    Loop

    Loop
    Select Case Rupees
    Case ""
    Rupees = ""
    Case "One"
    Rupees = "One Rupee"
    Case Else
    Rupees = Rupees & " Rupee"
    End Select
    Select Case Paise
    Case ""
    Paise = " Only"
    Case "One"
    Paise = " One Paise Only"

    Case Else
    Paise = " and " & Paise & " Paise Only"
    End Select
    SpellNumber = Rupees & Paise
    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

  35. its my first attempt and i did it and it is in dollars and i need it in rupees so i replace the "Dollars & Cents" to "Rupees & Paise " and it works . thank u

  36. Correct one For Indian 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 Rupee"
    Case Else
    Rupees = Rupees & " Rupees"
    End Select
    Select Case Paisa
    Case ""
    Paisa = " and No Paisa"
    Case "One"
    Paisa = " and One Paise"
    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

    1. Again Syntax error: Do While MyNumber ""

  37. Do we have to run that code, every time we open a new file?

    Thanks in advance.

  38. Hello Sir. i got error with VAT 10% i have SUBTOTAL and VAT = GRANDTOTAL ex: 68.18(subtotal) + 6.82(VAT) = 74.00 (GrandTotal) By when convert to Words it show Seventy Four and Ninty Nine Cents how can i fix it ?

    1. Hello!
      The numbers that you see in the table are rounded by Excel taking into account formatting. But this does not change their real values. Therefore, use the ROUND function when calculating totals.
      I hope this will help, otherwise please do not hesitate to contact me anytime.

  39. Thank you this was very helpful.

  40. I just want the result to be : For example the amount is 1250 Afghani and i want the words to be One Thousand Two Hundred Fifty AFN Only, No cents are required

  41. indian rupees and paise

    that is 1100.50 One thousand one hundred and fifty paise only

  42. excel ma
    1) Alt+f11
    2) insert ma module click karain us ma jo window open hogi us ma nicha jo diya ha woh copy kar ka us ma past kardain
    3) ab koi bhi cell na ja kar =spellNumber(A)
    4) A ki jaga woh cell number dalain jis ko convert karna hai

    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) = " Lac "
    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 rupees 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 Rupees"
    Case Else
    Rupees = Rupees & " Rupees"
    End Select
    Select Case Paise
    Case ""
    Paise = " and No Paise"
    Case "One"
    Paise = " and One Paise"
    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

    1. Syntax error on this line: Do While MyNumber ""

  43. This is great. I'm only having hard time converting centavos, instead of words i need it to be for example 25/100

  44. Hi... Can you please tell me how to disable the decimal conversions? i dont want the decimals e.g: 7.82 = Seven dollars and eighty two cents... I want it to read Eight dollars... where the decimals are rounded off.

  45. i have done this several time time but today i faild, or maybe because of the excel type, is there anything can be work in all the types of excells?

    cheers,
    Ali

  46. Syntax Error

  47. Indian Rupees not work , Its variable error coming

  48. i need a code for pakistan rupees conversion having no decimal in it can any one help me to send the code

  49. how to set excel formulas number to word in Bahraini Dinars ?

    I would like to get it as for example (160.525) Bahraini Dinars
    = One Hundred Sixty BD and Five Hundred Twenty Five Fils Only

    Please help me

    Thank you

  50. How to set excel formulas number to word in Philippine Peso?

    1. 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 "

      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 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 Pesos"
      Case Else
      Pesos = Pesos & " Pesos"
      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 = Pesos & 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

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)