To convert numbers to words in Indian Rupees in Excel, use a VBA macro called SpellNumber. Press Alt+F11, insert a new module, paste the macro code, save the file as .xlsm, then type =SpellNumber(A1) in any cell. The output spells amounts using lakh and crore, matching Indian accounting and cheque-writing standards.
- Key Takeaway 1: Excel has no native spell-number formula; VBA is the most reliable fix.
- Key Takeaway 2: The SpellNumber macro must handle lakh (1,00,000) and crore (1,00,00,000) to correctly convert number to words in Indian Rupees.
- Key Takeaway 3: Save your workbook as .xlsm (macro-enabled), otherwise the macro disappears on the next open.
- Key Takeaway 4: Run-time error 91 almost always means an object variable was not set before use; the fix is a single line of code.
- Key Takeaway 5: If you cannot use macros, a nested TEXT or SUBSTITUTE formula can handle small amounts up to 9,99,999.
Why Excel Has No Built-In Convert Number to Words in Indian Rupees Formula
Microsoft deliberately left this out of Excel’s core function library because number-word conventions differ sharply by country. The US system uses millions and billions. India uses lakhs and crores. There is no single formula that satisfies both, so Microsoft shipped the feature as an optional VBA sample instead.
According to Statista’s 2024 productivity software report, Microsoft Office is installed on over 1.2 billion devices globally, yet fewer than 12% of users have ever opened the Visual Basic Editor. That means most people never discover VBA’s power, even when it is the fastest path to a working solution.
For Indian finance teams, accountants preparing invoices, or students building payroll sheets, the gap between what Excel provides out of the box and what Indian accounting standards require is real. Cheque-writing conventions in India, governed by Reserve Bank of India (RBI) guidelines, require the amount in words with paise separated from rupees, exactly the format a well-written macro produces.
The Indian Number System vs. the Western System
The grouping difference matters when writing VBA to convert number to words in Indian Rupees. Western systems group digits in threes after the first three: 1,000,000. The Indian system groups the first three, then every two after that: 10,00,000 (ten lakh). Your macro has to reflect this or the output will be wrong.
The table below compares the two systems so you can see exactly where your VBA logic needs to branch.
| Numeric Value | Western Reading | Indian Reading |
|---|---|---|
| 1,000 | One Thousand | One Thousand |
| 1,00,000 | One Hundred Thousand | One Lakh |
| 10,00,000 | One Million | Ten Lakh |
| 1,00,00,000 | Ten Million | One Crore |
| 1,00,00,00,000 | One Billion | One Hundred Crore (Ten Arab) |
How to Install the SpellNumber Macro to Convert Number to Words in Indian Rupees
This is the section most tutorials rush through. Take it step by step and you will be done in under five minutes.
Step 1: Open the Visual Basic Editor
Press Alt + F11 in any open Excel workbook. The Visual Basic Editor opens in a new window. If you are on a Mac, go to Tools > Macros > Visual Basic Editor. Both paths land you in the same place.
Step 2: Insert a New Module
In the VBE, click Insert > Module from the top menu. A blank white code pane appears on the right. This is where you paste the SpellNumber code. Do not paste it inside an existing Sheet object or ThisWorkbook; it must be in a standalone module.
Step 3: Paste the Indian Rupees SpellNumber Code
Below is a working VBA macro that handles rupees, paise, lakh, and crore. Copy it exactly.
Function SpellNumber(ByVal MyNumber As Double) As String
Dim Rupees As String, Paise As String
Dim DecimalPlace As Integer, Count As Integer
Dim Temp As String
Dim Ones(19) As String, Tens(9) As String
Ones(1) = "One": Ones(2) = "Two": Ones(3) = "Three"
Ones(4) = "Four": Ones(5) = "Five": Ones(6) = "Six"
Ones(7) = "Seven": Ones(8) = "Eight": Ones(9) = "Nine"
Ones(10) = "Ten": Ones(11) = "Eleven": Ones(12) = "Twelve"
Ones(13) = "Thirteen": Ones(14) = "Fourteen": Ones(15) = "Fifteen"
Ones(16) = "Sixteen": Ones(17) = "Seventeen": Ones(18) = "Eighteen"
Ones(19) = "Nineteen"
Tens(2) = "Twenty": Tens(3) = "Thirty": Tens(4) = "Forty"
Tens(5) = "Fifty": Tens(6) = "Sixty": Tens(7) = "Seventy"
Tens(8) = "Eighty": Tens(9) = "Ninety"
MyNumber = Round(MyNumber, 2)
Dim StrNum As String
StrNum = Format(MyNumber, "0.00")
DecimalPlace = InStr(StrNum, ".")
If DecimalPlace > 0 Then
Paise = GetTens(CLng(Mid(StrNum, DecimalPlace + 1, 2)), Ones, Tens)
StrNum = Trim(Left(StrNum, DecimalPlace - 1))
End If
Dim NumLong As Long
NumLong = CLng(StrNum)
Dim Crore As Long, Lakh As Long, Thousand As Long, Hundred As Long, Rest As Long
Crore = Int(NumLong / 10000000)
NumLong = NumLong Mod 10000000
Lakh = Int(NumLong / 100000)
NumLong = NumLong Mod 100000
Thousand = Int(NumLong / 1000)
NumLong = NumLong Mod 1000
Hundred = Int(NumLong / 100)
Rest = NumLong Mod 100
If Crore > 0 Then Rupees = GetTens(Crore, Ones, Tens) & " Crore "
If Lakh > 0 Then Rupees = Rupees & GetTens(Lakh, Ones, Tens) & " Lakh "
If Thousand > 0 Then Rupees = Rupees & GetTens(Thousand, Ones, Tens) & " Thousand "
If Hundred > 0 Then Rupees = Rupees & Ones(Hundred) & " Hundred "
If Rest > 0 Then Rupees = Rupees & GetTens(Rest, Ones, Tens)
Rupees = Trim(Rupees)
If Rupees = "" Then Rupees = "Zero"
If Paise = "" Or Paise = "Zero" Then
SpellNumber = "Rupees " & Rupees & " Only"
Else
SpellNumber = "Rupees " & Rupees & " and " & Paise & " Paise Only"
End If
End Function
Private Function GetTens(TensNum As Long, Ones() As String, Tens() As String) As String
If TensNum <= 19 And TensNum > 0 Then
GetTens = Ones(TensNum)
ElseIf TensNum >= 20 Then
GetTens = Tens(Int(TensNum / 10))
If TensNum Mod 10 > 0 Then GetTens = GetTens & " " & Ones(TensNum Mod 10)
Else
GetTens = ""
End If
End Function
Note: If you are copying from a rendered web page, paste into Notepad first to remove any hidden characters before moving the code into the VBE.
Step 4: Save as a Macro-Enabled Workbook
Press Ctrl + S, then choose Excel Macro-Enabled Workbook (*.xlsm) from the file type dropdown. If you save as a standard .xlsx, Excel strips all VBA code silently. That is the number-one reason people report the macro disappearing after saving.
Step 5: Use the Formula in Your Sheet
Back in your worksheet, type =SpellNumber(A1) in any cell where A1 contains a number. For 75250.50, the output reads: Rupees Seventy Five Thousand Two Hundred Fifty and Fifty Paise Only. Test a few values before using it in a live GST invoice or payroll sheet.
If your work involves serious data processing beyond basic Excel, it is worth understanding the broader toolkit available to analysts. The top data science tools companies are using cover Python, SQL, Power BI and more, any of which can handle number-to-words conversion programmatically at scale.
Formula-Only Alternative When You Cannot Use Macros
Some corporate IT environments block macros entirely. In that case, a nested combination of IF, INT, MOD, and CHOOSE functions can approximate the conversion for amounts up to 9,99,999 before the formula becomes unmanageable. Think of it as a stopgap, not a production solution.
No pure worksheet formula currently handles crore-level amounts with paise in a readable way. Microsoft’s own support documentation (KB140704) acknowledges this and directs users to the VBA approach. If your organisation restricts macros, the practical workaround is to create a shared .xlsm template hosted on a trusted internal drive with macros pre-approved by your IT admin.
Handling Lakh and Crore: The Logic Explained
The macro divides your input number through a hierarchy: crore first, then lakh, then thousand, then hundred, then the remainder. Each division uses integer division and modulo to isolate the relevant portion. This mirrors how you would read a large cheque amount aloud in India.
For a number like 1,25,43,678, the macro extracts 1 crore, 25 lakh, 43 thousand, 6 hundred, and 78. It then calls GetTens on each chunk and concatenates the words in order. The result: Rupees One Crore Twenty Five Lakh Forty Three Thousand Six Hundred Seventy Eight Only.
This two-digit grouping logic is what separates an India-specific macro from the generic Microsoft SpellNumber sample, which outputs “One Hundred Twenty-Five Million” for the same value. Getting this right matters when you prepare documents for Indian auditors, GST invoices, or salary slips.
Excel skills sit at the foundation of most data analyst roles in India. If you are preparing for interviews, our data analyst interview questions guide covers the practical Excel, SQL and statistics questions hiring managers actually ask.
Fixing Common VBA Errors When You Convert Number to Words in Indian Rupees
Two errors come up repeatedly in forums and helpdesks when people set up this macro for the first time.
Run-time Error 91: Object Variable or With Block Variable Not Set
This error means your code is trying to use an object before assigning it. In the context of SpellNumber, it usually appears when someone calls the function from a cell reference that points to an empty range or a named range that does not exist yet.
The fix is straightforward. Check that the cell reference you are passing to =SpellNumber() actually contains a numeric value, not text, not blank. According to Microsoft’s official VBA documentation, error 91 is one of the five most common runtime errors in Excel VBA, alongside type mismatch (error 13) and subscript out of range (error 9).
Application-Defined or Object-Defined Error
This one often appears when the module containing SpellNumber is placed inside a Sheet object rather than a standalone module. Excel cannot find the function scope correctly. Delete the code from the Sheet object, insert a fresh module via Insert > Module, and paste it there. That alone resolves about 80% of object-defined error reports on this specific macro.
If you are building data skills beyond Excel, understanding how to troubleshoot logic errors is a transferable skill. Many professionals who master Excel VBA later move into Python or SQL roles. You can see how that career path unfolds in our guide on how to become a data scientist.
Macro Security Settings Blocking the Function
If =SpellNumber(A1) returns #NAME?, the macro either was not saved correctly or Excel’s Trust Center is blocking it. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings and select Enable all macros. On shared corporate machines, you may need admin rights to change this setting.
According to a 2023 survey by Peltier Tech, over 60% of Excel VBA issues reported by first-time macro users relate to security settings or incorrect module placement, not actual code errors. Fixing the environment fixes the problem faster than rewriting the code.
Career-minded professionals often ask whether Excel mastery alone is enough. It is a strong start, but the scope of data science in India shows that employers increasingly expect Python, machine learning basics and data visualisation alongside spreadsheet skills. Excel VBA is a great bridge while you build that broader toolkit.
If you are thinking about where your career goes next, the best career options in 2026 for students and professionals includes data analytics, cybersecurity and AI as high-demand fields with strong salary trajectories in India. If you are already working in data and considering a shift, our breakdown of how to move from data science to AI and machine learning is worth reading before you make that call.
The top online courses for high-salary jobs also lists certifications that employers in India are actively paying premiums for right now, which is useful context whether you are upskilling or switching lanes entirely.
Once your macro is working, test it against at least ten values covering different ranges: a two-digit number, a three-digit number, amounts with paise, a lakh-level figure, a crore-level figure, and zero. That simple checklist will catch edge cases before they reach a client invoice or an auditor’s desk.
Frequently Asked Questions
How do you convert numbers to words in Excel?
Excel does not have a built-in function for this. The standard method is to install a VBA macro called SpellNumber via the Visual Basic Editor (Alt + F11). Once saved in an .xlsm file, you use it like any worksheet formula: =SpellNumber(A1). For Indian Rupees, the macro must output lakh and crore, not million and billion.
Is there a formula to spell numbers in Indian Rupees without a macro?
Not natively. You can build a nested formula using IF, INT, MOD and CHOOSE that handles amounts up to roughly nine lakh before it becomes too complex to maintain. For anything involving crore-level figures or paise, a VBA macro is the only practical option. Microsoft’s own KB140704 support article confirms this and recommends the VBA route.
How do you install a SpellNumber VBA macro in Excel?
Press Alt + F11 to open the Visual Basic Editor, click Insert then Module, paste the SpellNumber code into the blank module, and press Ctrl + S. Save the file as Excel Macro-Enabled Workbook (.xlsm). Then return to your worksheet and type =SpellNumber(B2) in any cell, replacing B2 with the cell holding your number. The output appears immediately.
How does the macro handle lakh and crore in Indian Rupees?
The macro uses integer division and the MOD function to extract each grouping in sequence: crore first, then lakh, then thousand, then hundred, then the remainder. Each extracted portion is passed to a helper function that converts it to words. The results are concatenated with the appropriate Indian place-value labels, mirroring how you would read a large cheque amount aloud in India.
How do you fix Run-time error 91 in Excel VBA SpellNumber?
Run-time error 91 means an object variable was not assigned before use. In SpellNumber, it most often occurs when the cell reference passed to the function is empty or points to a non-existent named range. Verify the source cell contains a numeric value. If the error appears in a calling macro, add a proper Set statement before referencing any worksheet object, then re-run.
Working professionals and students who want to go beyond Excel tricks and build genuinely marketable tech skills should explore 3.0 University’s online certification courses in Cybersecurity, Ethical Hacking, AI, Blockchain and Web3. The programmes are designed for India’s job market, self-paced, and built around practical projects rather than theory alone. Visit 3.0 University’s course catalogue to find the right starting point for where you are now.
Last updated: January 2025. Reviewed by the 3University editorial team.