• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

SpellNumber Indian Rupees Function In Excel

SpellNumber Indian Rupees Function In Excel

SpellNumber Indian Rupees Function is an Excel function manually created with VBA code to change a given number to written words in Indian Rupees. In other words, it converts a numeric value of INR to words along with paise.

Microsoft Excel does not have an inbuilt function to display the numeric value in words. As many and many users demanded Microsoft has provided the SpellNumber VBA code.

It can be inserted into your Excel workbook. This function spells the numeric value to words as the name suggests.

In simple terms, to display $ 2,345.50 as “Dollar Two Thousand Three Hundred Forty-Five and Fifty Cents”, you can use the SpellNumber Function.

Whereas, to display INR 2,345.50 as ” Two Thousand Three Hundred Forty-Five Rupees and Fifty Paise ” using the SpellNumber Indian Rupees Function.

We have edited the same code with some changes for the required result.

In this article, we will discuss the whole step by step process on how to create this SpellNumber Function for Indian Rupees using the VBA.

You can also check our SpellNumber Without Currency and SpellNumber for UAE Dirhams.

How To Create SpellNumber Indian Rupees Function

Step 1: Open a new workbook.

Step 2: In the Top Ribbon, Go To Developer Tab.

Step 3: Click on “Visual Basic” in Code.

Step 4: Click on “Module” under the Insert menu as shown below:

SpellNumber Indian Rupees

A blank module sheet will open.

Step 4: Copy the below code and paste it into this Module sheet.

Code for SpellNumber Function for INR


Option Explicit
'Main Function www.ExcelDataPro.com
Function SpellNumberEDP2(ByVal MyNumber, Optional MyCurrency As String = "")
Dim Dollars, Cents, Temp
Dim DecimalPlace, Count, x
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Lacs "
Place(4) = " Crores "
Place(5) = " Hundred Crores "
' 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 <> ""
If Count = 1 Then
x = 3
Else
x = 2
End If
Temp = GetHundreds(Right(MyNumber, x))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > x Then
MyNumber = Left(MyNumber, Len(MyNumber) – x)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Dim str_amount, str_amounts
Dim str_cent, str_cents
Select Case UCase(MyCurrency)
Case "INR"
str_amount = "Rupee"
str_amounts = "Rupees"
str_cent = "Paisa"
str_cents = "Paisas"
Case "PKR"
str_amount = "Rupee"
str_amounts = "Rupees"
str_cent = "Paisa"
str_cents = "Paisas"
Case "BDT"
str_amount = "Taka"
str_amounts = "Takas"
str_cent = "Poysha"
str_cents = "Poysha"
End Select
Select Case Dollars
Case ""
Dollars = "No " & str_amounts
Case "One"
Dollars = "One " & str_amount
Case Else
Dollars = Dollars & " " & str_amounts
End Select
Select Case Cents
Case ""
Cents = " and No " & str_cents
Case "One"
Cents = " and One " & str_cent
Case Else
Cents = " and " & Cents & " " & str_cents
End Select
SpellNumberEDP2 = 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

view raw

SpellNumberEDP2.vb

hosted with ❤ by GitHub

Error Rectification

If the above code doesn’t run or gives the following error “COMPILE ERROR” then follow the following steps:

  1. Click on “view raw” below the code.
    SpellNumber
  2. A new window will open with the code.
  3. Copy that code and paste it into the VBA module instead of direct copy paste.

Step 5: Click the “Save” button or press Ctrl+S.  The screen will display a dialog box as shown below.

SpellNumber Indian Rupees

Your file now consists of a macro thus you need to click the “No” option.

Step 6: Select “Save As”.

SpellNumber Indian Rupees

Select the desired location where you want to save this file and select the “Save as type” as an “Excel macro-enabled workbook”.

SpellNumber function for INR (Indian Rupees) is now created and saved in your workbook.

Using SpellNumber Indian Function

Let us try the above code which we created in our workbook.

Insert number in column A. In column B insert the formula: = SpellNumberEDP2(A1, “INR”). Use the fill handle function to copy the formula in all rows.

SpellNumber Indian Rupees

It will display the word Indian rupees format as shown below:

SpellNumber Indian Rupees

Note: Please keep in mind that this function will only be available in this workbook. Follow the above spets to get this function in another workbook. 

Please keep in mind that every time you open this workbook or any other macro-enabled workbook you will get a security warning below the ribbon. See the image below:

SpellNumber Indian Rupees

Select “Enable this content” and click on “OK”. Otherwise, the code will not function.

SpellNumber Indian Rupees

We thank our readers for liking, sharing, and following us on different social media platforms.

If you have any queries or suggestions please share in the comment section below. I will be more than happy to assist you.

Filed Under: Microsoft Excel

You are Here: Home / Reader's Question / Microsoft Excel / SpellNumber Indian Rupees Function In Excel

About Shabbir Bhimani

I have worked in Excel and like to share functional excel templates at ExcelDataPro.

Comments

  1. soniya says

    September 11, 2019 at 1:23 pm

    AFTER CLOSE THE EXCEL SPELL NUMBER FORMULA COULD NOT RUN

    Reply
    • Fahim Lashkaria says

      September 12, 2019 at 11:14 am

      You need to save the file as a macro-enabled file. The spell number is specific for the file you add. It will not work in another file unless you do add the code in the new file and save it as a macro-enabled file.

      Reply
      • tushar moradiya says

        July 11, 2020 at 5:44 pm

        sir not insart this formual of exel please halp me sir..

        Reply
        • Fahim Lashkaria says

          July 13, 2020 at 2:42 pm

          Can you please describe what problem you are facing?

          Reply
      • Uday Sawant says

        October 29, 2020 at 2:35 pm

        showing below message
        MyNumber = Trim(Left(MyNumber, DecimalPlace – 1))

        Reply
        • Fahim Lashkaria says

          October 30, 2020 at 3:39 pm

          Error rectified and code updated. Insert function as =SpellNumberEDP2(A1, “INR”) to get the result.

          Reply
          • BluTen says

            November 21, 2020 at 10:00 am

            Sir i dont think thats the problem its says syntax error in that line

          • Fahim Lashkaria says

            November 23, 2020 at 7:53 pm

            I will check and revert.

        • Fahim Lashkaria says

          January 6, 2021 at 5:35 pm

          Matter solved. Kindly look for the solution under the heading of “Error Rectification” in the below the code. Thank. Insert function as =SpellNumberEDP2(A1, “INR”) to get the result.

          Reply
  2. abdulwaheed says

    October 30, 2019 at 4:45 pm

    can we save permanently in Ms Excel When we open any file then no need to add this code again and again

    Reply
    • Fahim Lashkaria says

      November 4, 2019 at 12:18 pm

      No, you cannot save this permanently in excel. You need to enter the code in each file you want.

      Reply
  3. shankar says

    October 31, 2019 at 5:38 pm

    No Rupees and Ten Paise
    One Rupee and No Paise
    Ten Rupees and No Paise
    One Hundred Rupees and No Paise
    One Thousand Rupees and No Paise
    Ten Thousand Rupees and No Paise
    One Lacs Rupees and No Paise
    Ten Lacs Rupees and No Paise
    One Crores Rupees and No Paise
    Ten Crores Rupees and No Paise
    One Hundred Crores Rupees and No Paise
    ———————————————————————— (no confusion)

    Ten Hundred Crores Rupees and No Paise
    (can u mention it as thousand crores)
    ————————————————————————
    further , can u add this , since it is not there , if we have to do gdp figure analysis , it is needed.

    ten thousand crore
    lakh crore
    ten lakh crore
    hunderd lakh crores

    thanks in advance

    Reply
    • Fahim Lashkaria says

      November 4, 2019 at 12:16 pm

      An email has been sent to your email address related to your query.

      Reply
      • Santosh K Sethi says

        April 18, 2020 at 1:45 pm

        Thanks for sharing your knowledge with creativity.

        No Rupees and Ten Paise
        One Rupee and No Paise
        Ten Rupees and No Paise
        One Hundred Rupees and No Paise
        One Thousand Rupees and No Paise
        Ten Thousand Rupees and No Paise
        One Lacs Rupees and No Paise
        Ten Lacs Rupees and No Paise
        One Crores Rupees and No Paise
        Ten Crores Rupees and No Paise
        One Hundred Crores Rupees and No Paise
        ———————————————————————— (no confusion)

        Ten Hundred Crores Rupees and No Paise
        (can u mention it as thousand crores)
        ————————————————————————
        further , can u add this , since it is not there , I have to analyze bigger figure analysis , so it is needed.

        ten thousand crore
        lakh crore
        ten lakh crore
        hunderd lakh crores

        Can u send this to my email ID.

        Thank you in advance.

        Reply
        • Fahim Lashkaria says

          April 18, 2020 at 5:19 pm

          Thanks for the appreciation dear. The cod file is given in the article, hence you can also easily add this to the code and make it as per your needs.

          Reply
  4. shankar says

    November 5, 2019 at 5:30 am

    instead of :- Ten Hundred Crores Rupees and No Paise
    can u mention it as:- thousand crores Rupees and No Paise
    ————————————————————————
    for the below mentioned values , there are no information ,
    can you please create them :-

    1) ten thousand crors Rupees and No Paise
    2) lakh crores Rupees and No Paise
    3) ten lakh crores Rupees and No Paise
    4) hunderd lakh crores Rupees and No Paise

    thanks in advance

    Reply
    • Fahim Lashkaria says

      November 5, 2019 at 11:42 am

      Dear Shankar, Already sent an email on shankarsetty@yahoo.com

      Reply
  5. Guruprasad A M says

    December 21, 2019 at 1:06 pm

    Sir, I donot want the “No paise” to be displayed. What should be done to get absolute value alone.

    Thanks in advance
    regards

    Reply
    • Fahim Lashkaria says

      December 21, 2019 at 1:40 pm

      You can remove it from the code and it will not display the No paise.

      Reply
      • Ravneet Singh says

        May 25, 2020 at 7:15 pm

        Hi Sir- I got rid of No Paise but is it possible to have “Rupees” or “INR” in front of the amount in words- For Eg “INR Seventy One Thousand Only” or ” Rupees Seventy One thousand only”

        Reply
  6. P Rakshit says

    January 24, 2020 at 2:36 pm

    Formula to convert indian currency upto 10 digit:

    =IF(D71,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),3,1)+1,””,”-one”,”-two”,”-three”,”-four”,”-five”,”-six”,”-seven”,”-eight”,”-nine”),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),2,1))=0,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),3,1)+1,””,”one”,”two”,”three”,”four”,”five”,”six”,”seven”,”eight”,”nine”),””)),IF(D7>=10^8,” corer “,””),CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),4,1)+1,””,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),5,1)+1,”ten”,”eleven”,”twelve”,”thirteen”,”fourteen”,”fifteen”,”sixteen”,”seventeen”,”eighteen”,”nineteen”),”twenty”,”thirty”,”forty”,”fifty”,”sixty”,”seventy”,”eighty”,”ninety”),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),4,1))>1,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),5,1)+1,””,”-one”,”-two”,”-three”,”-four”,”-five”,”-six”,”-seven”,”-eight”,”-nine”),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),4,1))=0,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),5,1)+1,””,”one”,”two”,”three”,”four”,”five”,”six”,”seven”,”eight”,”nine”),””)),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),3,3))>0,” lakh “,””),CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),6,1)+1,””,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),7,1)+1,”ten”,”eleven”,”twelve”,”thirteen”,”fourteen”,”fifteen”,”sixteen”,”seventeen”,”eighteen”,”nineteen”),”twenty”,”thirty”,”forty”,”fifty”,”sixty”,”seventy”,”eighty”,”ninety”),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),6,1))>1,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),7,1)+1,””,”-one”,”-two”,”-three”,”-four”,”-five”,”-six”,”-seven”,”-eight”,”-nine”),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),6,1))=0,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),7,1)+1,””,”one”,”two”,”three”,”four”,”five”,”six”,”seven”,”eight”,”nine”),””)),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),5,3)),” thousand “,””),CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),8,1)+1,””,”one hundred “,”two hundred “,”three hundred “,”four hundred “,”five hundred “,”six hundred “,”seven hundred “,”eight hundred “,”nine hundred “),CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),9,1)+1,””,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),10,1)+1,”ten”,”eleven”,”twelve”,”thirteen”,”fourteen”,”fifteen”,”sixteen”,”seventeen”,”eighteen”,”nineteen”),”twenty”,”thirty”,”forty”,”fifty”,”sixty”,”seventy”,”eighty”,”ninety”),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),9,1))>1,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),10,1)+1,””,”-one”,”-two”,”-three”,”-four”,”-five”,”-six”,”-seven”,”-eight”,”-nine”),IF(VALUE(MID(TEXT(INT(D7),REPT(0,10)),9,1))=0,CHOOSE(MID(TEXT(INT(D7),REPT(0,10)),10,1)+1,””,”one”,”two”,”three”,”four”,”five”,”six”,”seven”,”eight”,”nine”),””))),” “,” “)&IF(FLOOR(D7,1)>1,” rupees”,” “)&IF(AND(D7>=1,D7<2),"rupee",""))&IFERROR(IF(D71,CHOOSE(MID(TEXT(INT(LEFT(TRIM(MID(SUBSTITUTE(D7,”.”,REPT(” “,255)),255,200)),2)),REPT(0,10)),10,1)+1,””,”-one”,”-two”,”-three”,”-four”,”-five”,”-six”,”-seven”,”-eight”,”-nine”)&” paisa”,IF(LEFT(TRIM(MID(SUBSTITUTE(D7,”.”,REPT(” “,255)),255,200)),2)=”01″,”one paisa”,IF(LEFT(TRIM(MID(SUBSTITUTE(D7,”.”,REPT(” “,255)),255,200)),1)=”0″,CHOOSE(MID(TEXT(INT(LEFT(TRIM(MID(SUBSTITUTE(D7,”.”,REPT(” “,255)),255,200)),2)),REPT(0,10)),10,1)+1,””,”one”,”two”,”three”,”four”,”five”,”six”,”seven”,”eight”,”nine”)&” paisa”,””))))),””)))

    Reply
    • Cleetus says

      November 27, 2020 at 10:35 pm

      This formula is not working. Also D71 should be corrected as D7. Even then the formula is not accepted.

      Can you test it in your Excel workbook and if okay then send me a copy?

      Thanks.

      Reply
      • Fahim Lashkaria says

        November 29, 2020 at 8:33 pm

        Thanks for notifying us. We will look into this and do the needful.

        Reply
        • GEORGE says

          December 23, 2020 at 12:27 pm

          Hi Sir- I got rid of No Paise but is it possible to have “Rupees” or “INR” in front of the amount in words- For Eg “INR Seventy One Thousand Only” or ” Rupees Seventy One thousand only”

          Reply
          • Fahim Lashkaria says

            December 23, 2020 at 12:32 pm

            IN code line 73 try inserting the following:
            SpellNumberEDP2 = “Rupees” & Dollars & Cents
            This will repeat the word two times rupees. If you don’t want that then the whole string and must be changed

      • Nishant Bhola says

        January 4, 2021 at 7:58 pm

        can someone please look in to the issue.

        Reply
        • Fahim Lashkaria says

          January 4, 2021 at 8:01 pm

          Hi Nishant. The issue is under resolution. Hopefully, in 2 days it will be resolved with new code and updated. Thanks

          Reply
      • Fahim Lashkaria says

        January 6, 2021 at 5:36 pm

        Matter solved. Kindly look for the solution under the heading of “Error Rectification” in the below the code. Thank. Insert function as =SpellNumberEDP2(A1, “INR”) to get the result.

        Reply
  7. Vivek Satam says

    March 27, 2020 at 4:10 pm

    hi,
    I needed the value only in Crores and Lacs.
    E.g. 2,07,82489 i want only 2 Crores and 78 Lacs to be shown.

    how can i do that

    Reply
    • Fahim Lashkaria says

      March 28, 2020 at 8:19 pm

      You need to amend the code accordingly.

      Reply
  8. Tarun Sharma says

    April 24, 2020 at 3:47 pm

    I want to ₹ sign in front of words.

    Reply
    • Fahim Lashkaria says

      April 27, 2020 at 11:58 am

      Insert ₹ sign in the code.

      Reply
  9. PAMELA DSOUZA says

    May 2, 2020 at 9:34 pm

    Sir,
    I am very happy with the above vba and tweeked it a little to suit my needs. I dont know anything in programming all i have learned is on the job.

    We deal in big figures hence can u please give me a conversion wherein Rs.12345,67,89,012 is converted as Rupees Twelve Thousand Three Hundred Forty Five Crores Sixty Seven Lakhs Eighty Nine Thousand Twelve Only

    Now it is doing as under
    Rupees One Thousand Twenty Three Hundred Forty Five Crores Sixty Seven Lakhs Eighty Nine Thousand Twelve Only

    Thank you

    GOD BLESS

    Reply
    • Fahim Lashkaria says

      May 5, 2020 at 11:12 am

      Glad to know that it was helpful. We are working on your request. Will soon be published on our website.

      Reply
      • vipin says

        January 4, 2021 at 4:24 pm

        not working after opening macro enabled file
        showing Syntax error for =SpellNumberEDP2(A1,”INR”)
        putting 32.2 at A1

        Reply
        • Fahim Lashkaria says

          January 4, 2021 at 8:02 pm

          The issue is under resolution. Hopefully, in 2 days it will be resolved with new code and updated. Thanks

          Reply
        • Fahim Lashkaria says

          January 6, 2021 at 5:30 pm

          Matter solved. Kindly look for the solution under the heading of “Error Rectification” in the below the code. Thanks

          Reply
    • Ravneet Singh says

      May 25, 2020 at 9:29 pm

      Hi, Hope you are well. Can you please help me with tweaking “Rupees” or “INR” in front instead at the last. Right now I have ” Thirty One Thousand Rupees” I would prefer it “INR Thirty One Thousand Only”.

      Reply
      • Fahim Lashkaria says

        May 26, 2020 at 1:22 pm

        Insert the following code:

        Option Explicit
        ‘Main Function http://www.ExcelDataPro.com
        Function SpellNumber_Indian(ByVal MyNumber)
        Dim Dollars, Cents, Temp
        Dim DecimalPlace, Count, x
        ReDim Place(9) As String
        Place(2) = ” Thousand ”
        Place(3) = ” Lacs ”
        Place(4) = ” Crores ”
        Place(5) = ” Hundred Crores ”
        ‘ 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 <> “”
        If Count = 1 Then
        x = 3
        Else
        x = 2
        End If
        Temp = GetHundreds(Right(MyNumber, x))

        If Temp <> “” Then Dollars = Temp & Place(Count) & Dollars
        If Len(MyNumber) > x Then
        MyNumber = Left(MyNumber, Len(MyNumber) – x)
        Else
        MyNumber = “”
        End If
        Count = Count + 1
        Loop
        Select Case Dollars
        Case “”
        Dollars = “”
        Case “One”
        Dollars = ” One”
        Case Else
        Dollars = Dollars & ” Only”
        End Select
        Select Case Cents
        Case “”
        Cents = “”
        Case “One”
        Cents = ” and One Paise”
        Case Else
        Cents = ” and ” & Cents & ” Paise”
        End Select
        SpellNumber_Indian = “Rupees ” & 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

        Reply
        • Ravneet Singh says

          May 26, 2020 at 1:27 pm

          thank you so much Sir- Have a nice day ahead. I spent sometime last night more on this and tweaked it to get the desired result ” INR XXX ONLY”- thanks for all the help above in your posts. Working like a charm now. thank you!

          Reply
  10. Bhautik Vaghela says

    May 21, 2020 at 1:44 pm

    Hi…

    This is Good Syntax For Amount in Word.

    Here, Problem Comes at Another time open Excel Work Book File then Amount Word box in Show =NAME? Error.

    If Code Copy And Past then Work Done..
    Can we done One time Module Code paste and Everytime No Need to Copy Past??

    Reply
    • Fahim Lashkaria says

      May 21, 2020 at 6:44 pm

      You need to have a plug-in or add-in to solve this issue. Once you install that add-in you don’t need to copy-paste every time the code.

      Reply
  11. Ravneet Singh says

    May 25, 2020 at 7:10 pm

    Hi Sir and all,
    I need a small help.

    Currently I have value- 71,000 which is coming out to be ” Seventy One Thousand Rupees and No Paise”
    Is it possible I can have- ” Rupees Seventy one Thousand Only”

    Reply
  12. hakkim says

    May 30, 2020 at 11:14 am

    it converts rounded decimal figures too.how to avoid this..pls help

    Reply
    • Fahim Lashkaria says

      May 30, 2020 at 12:40 pm

      You need to remove the cents coding if you don’t need to take decimals to convert them.

      Reply
  13. Lahar says

    June 10, 2020 at 1:01 pm

    Hi Sir,

    When I run the formula it gives “Compile Error: Ambiguous name detected: GetHundreds”. than it takes me to the below Visual basic Code:

    ‘ 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

    Pls help.
    Thanks in Advance

    Reply
    • Fahim Lashkaria says

      June 10, 2020 at 4:48 pm

      Which function are you using? There are two function codes. One is inside the article and one is in the comment section.

      Reply
      • Pamela says

        July 30, 2020 at 4:56 pm

        sir,
        Since I find that you are helpful, I am sending this message. Can u please email me a VBA for the following
        supose i want to convert the following amount coz we deal in huge number
        eg 1198,76,54,320.55
        Please it should convert as under
        Rupees One thousand one hundred ninety eight crores seventy six lakhs fifty four thousand three hundred twenty and paise fifty five only.

        Thank you
        God Bless

        Reply
        • Fahim Lashkaria says

          August 5, 2020 at 12:21 pm

          Noted. Will get back to you on this soon.

          Reply
  14. hakkim says

    June 10, 2020 at 5:16 pm

    its ok sir, i removed decimal figure.
    thank u

    Reply
  15. Robinmarcus says

    June 15, 2020 at 1:39 pm

    i want formula for convert number into words in indian digits like ten hundred thousand ten thousand lakh ten lakh …………..

    Reply
    • Fahim Lashkaria says

      June 15, 2020 at 5:18 pm

      Please elaborate. We are unable to understand.

      Reply
  16. Arindam Mojumder says

    July 20, 2020 at 10:19 pm

    In current code, one lac is appearing as plural number one lacs, same is happening for crores also.
    Can it be one lac and once crore and not one lacs and one crores?

    Reply
    • Fahim Lashkaria says

      July 21, 2020 at 1:39 pm

      Go to Developer Tab. Click on the Visual Basic option. In the left menu click on Module that contains the VBA code. On lines 8 and 9, change “Lacs” to “Lac” and “Crores” to “Crore”. Thanks

      Reply
  17. ABHIJIT MANDAL says

    August 12, 2020 at 6:35 pm

    Please send the vba code to convert upto Rupees 999,99,999,99,99,999.99 from numeric value to word.

    Reply
    • Fahim Lashkaria says

      August 12, 2020 at 6:47 pm

      Hope this might help you.

      http://eforexcel.com/wp/article-26-converting-amount-into-words-indian-currency-rupees-and-paise/

      Reply
  18. R S Thkaur says

    September 19, 2020 at 11:21 am

    after using VBA SpellNumber formula in not working and showing result is #Name?

    Reply
    • Fahim Lashkaria says

      September 21, 2020 at 4:19 pm

      It is working fine for all. Might be an issue with your excel.

      Reply
    • Fahim Lashkaria says

      January 6, 2021 at 5:31 pm

      Matter solved. Kindly look for the solution under the heading of “Error Rectification” in the below the code. Thank. Insert function as =SpellNumberEDP2(A1, “INR”) to get the result.

      Reply
    • Fahim Lashkaria says

      January 6, 2021 at 5:36 pm

      Matter solved. Kindly look for the solution under the heading of “Error Rectification” in the below the code. Thank. Insert function as =SpellNumberEDP2(A1, “INR”) to get the result.

      Reply
  19. GK HARINADH says

    November 8, 2020 at 12:53 pm

    Sir
    Can I save this file with *.xlam file type?
    If yes, can I add this file in Add Ins and by enabling this Add ins , can I get this addin macro in every file of Excel work book without copying this code to every file?

    Reply
    • Fahim Lashkaria says

      November 12, 2020 at 12:09 pm

      This is a VBA code. It is not an Add-in. If you can make it you can add it.

      Reply
  20. Dheeraj says

    December 1, 2020 at 12:50 pm

    MyNumber = Left(MyNumber, Len(MyNumber) – x)

    syntax error is shown. Please check

    Reply
    • Fahim Lashkaria says

      December 5, 2020 at 1:02 pm

      under process. Will check and revert

      Reply
    • Fahim Lashkaria says

      January 6, 2021 at 5:37 pm

      Matter solved. Kindly look for the solution under the heading of “Error Rectification” in the below the code. Thank. Insert function as =SpellNumberEDP2(A1, “INR”) to get the result.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

ExcelDataPro

Free Excel Pro Templates

  • Glossary
    • Accounting Glossary
    • HR & Payroll Glossary
    • Tax Glossary
  • Templates
    • Accounting
      • Financial Analysis
      • Financial Statement
    • Educational
    • Taxation
      • Federal Income Tax
      • GST
      • UAE VAT
      • UK VAT
    • Human Resources
      • HR & Payroll
      • HR Metrics
    • School Management
    • Social Media
    • Sales-Marketing
    • Personal Finance
    • Other
      • Health & Fitness
  • Functions
  • Calculators
  • Home
  • Contact
  • Privacy
  • Terms

© ExcelDataPro 2025. Content Licensed Under Creative Commons with Attribution Required

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT