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:

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 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 = "No Rupees" | |

Case "One" | |

Dollars = "One Rupee" | |

Case Else | |

Dollars = Dollars & " Rupees" | |

End Select | |

Select Case Cents | |

Case "" | |

Cents = " and No Paise" | |

Case "One" | |

Cents = " and One Paise" | |

Case Else | |

Cents = " and " & Cents & " Paise" | |

End Select | |

SpellNumber_Indian = 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 |

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

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

**Step 6: **Select **“Save As”**.

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: = SpellNumber(A1). Use the fill handle function to copy the formula in all rows.

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

**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 image below:

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

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.

soniya says

AFTER CLOSE THE EXCEL SPELL NUMBER FORMULA COULD NOT RUN

Fahim Lashkaria says

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.

tushar moradiya says

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

Fahim Lashkaria says

Can you please describe what problem you are facing?

abdulwaheed says

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

Fahim Lashkaria says

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

shankar says

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

Fahim Lashkaria says

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

Santosh K Sethi says

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.

Fahim Lashkaria says

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.

shankar says

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

Fahim Lashkaria says

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

Guruprasad A M says

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

Thanks in advance

regards

Fahim Lashkaria says

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

Ravneet Singh says

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”

P Rakshit says

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”,””))))),””)))

Vivek Satam says

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

Fahim Lashkaria says

You need to amend the code accordingly.

Tarun Sharma says

I want to ₹ sign in front of words.

Fahim Lashkaria says

Insert ₹ sign in the code.

PAMELA DSOUZA says

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

Fahim Lashkaria says

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

Ravneet Singh says

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”.

Fahim Lashkaria says

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

Ravneet Singh says

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!

Bhautik Vaghela says

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??

Fahim Lashkaria says

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.

Ravneet Singh says

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”

hakkim says

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

Fahim Lashkaria says

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

Lahar says

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

Fahim Lashkaria says

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

Pamela says

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

Fahim Lashkaria says

Noted. Will get back to you on this soon.

hakkim says

its ok sir, i removed decimal figure.

thank u

Robinmarcus says

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

Fahim Lashkaria says

Please elaborate. We are unable to understand.

Arindam Mojumder says

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?

Fahim Lashkaria says

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

ABHIJIT MANDAL says

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

Fahim Lashkaria says

Hope this might help you.

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

R S Thkaur says

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

Fahim Lashkaria says

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