Excel has no built-in function to write amounts in words. Paste this VBA code once and you get =RUPEES(), which turns 1234567.50 into Rupees Twelve Lakh Thirty Four Thousand Five Hundred Sixty Seven and Fifty Paise Only: ideal for invoices, cheques and receipts.
Works inExcel 2010 and later, Windows and Mac
UndoNot possible. Save a copy first
Save asMacro-Enabled Workbook (.xlsm)
New to macros? See how to use the macros on this site: copy the code, paste it into a module with Alt + F11, and run it with Alt + F8.
Table of Contents
The RUPEES function (lakh and crore)
Press Alt + F11, choose Insert → Module, and paste all three parts:
Function RUPEES(ByVal amt As Double) As String
Dim r As Double, p As Long
r = Int(amt): p = Round((amt - r) * 100)
If p = 100 Then r = r + 1: p = 0
RUPEES = "Rupees " & InWords(r)
If p > 0 Then RUPEES = RUPEES & " and " & InWords(p) & " Paise"
RUPEES = RUPEES & " Only"
End Function
Private Function InWords(ByVal n As Double) As String
Dim s As String
If n >= 10000000 Then s = InWords(Int(n / 10000000)) & " Crore ": n = n - Int(n / 10000000) * 10000000
If n >= 100000 Then s = s & Two(Int(n / 100000)) & " Lakh ": n = n - Int(n / 100000) * 100000
If n >= 1000 Then s = s & Two(Int(n / 1000)) & " Thousand ": n = n - Int(n / 1000) * 1000
If n >= 100 Then s = s & Two(Int(n / 100)) & " Hundred ": n = n - Int(n / 100) * 100
If n > 0 Then s = s & Two(n)
If s = "" Then s = "Zero"
InWords = Trim(s)
End Function
Private Function Two(ByVal n As Long) As String
Dim a, t
a = Split("Zero One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen")
t = Split("x x Twenty Thirty Forty Fifty Sixty Seventy Eighty Ninety")
If n < 20 Then Two = a(n) Else Two = t(n \ 10) & IIf(n Mod 10, " " & a(n Mod 10), "")
End Function
Use it
| Formula | Result |
|---|---|
=RUPEES(1250) |
Rupees One Thousand Two Hundred Fifty Only |
=RUPEES(1234567.5) |
Rupees Twelve Lakh Thirty Four Thousand Five Hundred Sixty Seven and Fifty Paise Only |
=RUPEES(25000000) |
Rupees Two Crore Fifty Lakh Only |
=RUPEES(B12) |
The invoice total in B12, in words |
Use it in every workbook
- Save the code in your Personal Macro Workbook (PERSONAL.XLSB), then call it as
=PERSONAL.XLSB!RUPEES(B12). - Or save a workbook containing the code as an Excel Add-in (.xlam) and turn it on in File → Options → Add-ins. Then
=RUPEES(B12)works everywhere.
Without VBA
For a quick one-off, use the free number to words converter, which also does international format (million, billion).
Things to know
- Works for amounts up to 999 crore and beyond, rounded to the nearest paisa.
- Negative numbers aren’t handled. Use
=RUPEES(ABS(B12))if needed. - The workbook must be saved as .xlsm, or the code must be in PERSONAL.XLSB or an add-in.