One lakh is the most ordinary amount in Indian business - and the standard number-to-words code found all over the internet insists on calling it One Hundred Thousand. Neither answer is a bug. They are two different numbering systems, and your file can only speak one of them.
Before you blame the function, be clear about the real question: not is it working, but which system is it working in. This page shows the difference, gives you a ten-second test to check the add-in from the video, and prints the complete Lakh and Crore version of the function, copy-paste ready.
Example values - both lines are correct, in two different numbering systems. Your invoice must pick one.
The Western system climbs in steps of a thousand: Thousand, Million, Billion, and its commas group digits in threes - 12,345,678. The Indian system groups the first three digits, then twos - 1,23,45,678 - and climbs Thousand, Lakh (one hundred thousand), Crore (ten million), Arab, Kharab.
That is why this is not a word-swap. A function built for one system counts the digits in the wrong group sizes for the other, so simply renaming Million to Lakh inside the code produces confidently wrong words. Each system needs its own grouping logic.
Here is the honest answer: the video demonstrates the function with 1000 rupees, and 1000 reads One Thousand in both systems - so the demo itself cannot tell us which system the file speaks, and this page will not pretend otherwise.
The test takes ten seconds. Type 100000 in a cell and run the function on it:
Do this test once, before the file goes anywhere near a real invoice. The code printed on the main guide page of this series is the Western version.
If the test shows you need Lakh and Crore, use this version. Paste it into a module exactly like the main guide describes (Insert then Module in the VBA editor). Its name is SpellNumberIndian, so both functions can even live in the same file while you compare them.
Option Explicit
'Main Function - Indian numbering system (Lakh and Crore)
Function SpellNumberIndian(ByVal MyNumber)
Dim Rupees, Paise, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Lakh "
Place(4) = " Crore "
Place(5) = " Arab "
Place(6) = " Kharab "
' String representation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert Paise and set MyNumber to Rupee amount.
If DecimalPlace > 0 Then
Paise = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
' First group is three digits (hundreds).
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Rupees = Temp
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
' Every group after that is two digits (Thousand, Lakh, Crore...).
Count = 2
Do While MyNumber <> ""
Temp = GetTens(Right("0" & 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
Select Case Rupees
Case ""
Rupees = "No Rupees"
Case "One"
Rupees = "One Rupee"
Case Else
Rupees = Rupees & " Rupees"
End Select
Select Case Paise
Case ""
Paise = " Only"
Case "One"
Paise = " and One Paisa Only"
Case Else
Paise = " and " & Paise & " Paise Only"
End Select
' Application.Trim removes the extra spaces the groups leave behind.
SpellNumberIndian = Application.Trim(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
Use it as =SpellNumberIndian(A2). Notice what changed against the Western version: the main function first takes a group of three digits for the hundreds, then groups of two for Thousand, Lakh, Crore, Arab and Kharab. The three small helper functions at the bottom are identical in both versions.
Match the words your money already speaks. If your cheques, invoices and auditors write Lakh and Crore - and in India they almost always do - the Indian version is the correct one, whatever the Western one claims. If your company invoices foreign clients in dollars, the Western version matches their reading.
Whichever you choose, choose it once, for the whole office. Two systems running in two departments of the same company is how an amount gets read wrong in a meeting - the figures agree, the words argue.
See the file downloaded, the add-in switched on and the formula typed live - the complete method in about a minute.
Watch Full VideoNo. The word is only half the difference - the digit grouping changes too. In the Western code 100000 is read as a group of three digits, one hundred, in front of Thousand. Renaming words leaves that counting untouched and the results stay wrong. Use the Indian function, whose grouping is built for Lakh and Crore.
Type 100000 in any cell and run your function on it. One Lakh means the Indian system. One Hundred Thousand means the Western system. Amounts below one lakh read the same in both, which is why the difference so often goes unnoticed until a big invoice appears.
No. Number formats only change how the number is displayed - commas and decimals. The function reads the actual value in the cell, not the displayed text, so 1,00,000 and 100000 give the function exactly the same number.