Method 1 – Using the LEFT, MID, TEXT, and CHOOSE Functions in Excel to Convert Numbers to Words
We will convert the numbers into the Numbers in Words column.
- Insert the following formula in the C5 cell:
=CHOOSE(LEFT(TEXT(B5,"000000000.00"))+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--LEFT(TEXT(B5,"000000000.00"))=0,,IF(AND(--MID(TEXT(B5,"000000000.00"),2,1)=0,--MID(TEXT(B5,"000000000.00"),3,1)=0)," Hundred"," Hundred and ")) &CHOOSE(MID(TEXT(B5,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(B5,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT(B5,"000000000.00"),3,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"), CHOOSE(MID(TEXT(B5,"000000000.00"),3,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen")) &IF((--LEFT(TEXT(B5,"000000000.00"))+MID(TEXT(B5,"000000000.00"),2,1)+MID(TEXT(B5,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT(B5,"000000000.00"),4,1)+MID(TEXT(B5,"000000000.00"),5,1)+MID(TEXT(B5,"000000000.00"),6,1)+MID(TEXT(B5,"000000000.00"),7,1))=0,(--MID(TEXT(B5,"000000000.00"),8,1)+RIGHT(TEXT(B5,"000000000.00")))>0)," Million and "," Million ")) &CHOOSE(MID(TEXT(B5,"000000000.00"),4,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(B5,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT(B5,"000000000.00"),5,1)=0,--MID(TEXT(B5,"000000000.00"),6,1)=0)," Hundred"," Hundred and")) &CHOOSE(MID(TEXT(B5,"000000000.00"),5,1)+1,,," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety") &IF(--MID(TEXT(B5,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT(B5,"000000000.00"),6,1)+1,," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"),CHOOSE(MID(TEXT(B5,"000000000.00"),6,1)+1," Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen")) &IF((--MID(TEXT(B5,"000000000.00"),4,1)+MID(TEXT(B5,"000000000.00"),5,1)+MID(TEXT(B5,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT(B5,"000000000.00"),7,1)+MID(TEXT(B5,"000000000.00"),8,1)+MID(TEXT(B5,"000000000.00"),9,1))=0,--MID(TEXT(B5,"000000000.00"),7,1)<>0)," Thousand "," Thousand and ")) &CHOOSE(MID(TEXT(B5,"000000000.00"),7,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(B5,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT(B5,"000000000.00"),8,1)=0,--MID(TEXT(B5,"000000000.00"),9,1)=0)," Hundred "," Hundred and "))& CHOOSE(MID(TEXT(B5,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(B5,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT(B5,"000000000.00"),9,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(B5,"000000000.00"),9,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"))
The entire formula may appear complicated at first glance, but it repeats portions.
- Press Enter.
Formula Breakdown:
The TEXT function turns the number into a “000000000.00” text format.
TEXT(B7,”000000000.00″)
The LEFT function extracts the left-most character from the number. It allows us to identify if the return number is zero or any other value.
LEFT(TEXT(B7,”000000000.00″))
The CHOOSE function is used to represent the extracted number with appropriate words.
CHOOSE(LEFT(TEXT(B7,”000000000.00″))+1,,”One”,”Two”,”Three”,”Four”,”Five”,”Six”,”Seven”,”Eight”,”Nine”) checks if the value is zero. If it is zero, then it displays nothing.
CHOOSE(LEFT(TEXT(B7,”000000000.00″))+1,,”One”,”Two”,”Three”,”Four”,”Five”,”Six”,”Seven”,”Eight”,”Nine”)
&IF(–LEFT(TEXT(B7,”000000000.00″))=0,,
It will display “Hundred” if the next two numbers are zero. Otherwise, it will display “Hundred and.”
CHOOSE(LEFT(TEXT(B7,”000000000.00″))+1,,”One”,”Two”,”Three”,”Four”,”Five”,”Six”,”Seven”,”Eight”,”Nine”)
&IF(–LEFT(TEXT(B7,”000000000.00″))=0,,IF(AND(–MID(TEXT(B7,”000000000.00″),2,1)=0,–MID(TEXT(B7,”000000000.00″),3,1)=0),” Hundred”,” Hundred and “))
The formula continues with the same principle, adding the text for thousands or millions when it encounters additional digits.
This can’t perfectly represent decimal numbers after points and the maximum number is 999,999,999.
- Use the Excel AutoFill Feature to fill in the column.
You will get all the converted numbers into words.
Read More: How to Convert Peso Number to Words in Excel
Method 2 – Applying the VLOOKUP Function to Convert Numbers to Words
Steps:
- Write down all the numbers in words manually in the C column.
- Use the following formula in the C12 cell.
=VLOOKUP(B12,B4:C9,2,FALSE)
- Press Enter.
Formula Breakdown
- B12 is the lookup value that it looks for in the given table.
- B4:C9 is the table array in which it looks for the target value.
- 2 is the number of columns in the table from which a value is to be returned.
- False denotes an exact match.
This method only works if you have a predetermined list that you can check.
Method 3 – Using VBA to convert Numbers to Words in Excel
Steps:
- Go to the Developer tab and select Visual Basic.
- From the Insert tab, select Module.
- Insert the following code in the Module.
Function number_converting_into_words(ByVal MyNumber)
Dim x_string As String
Dim whole_num As Integer
Dim x_string_pnt
Dim x_string_Num
Dim x_pnt As String
Dim x_numb As String
Dim x_P() As Variant
Dim x_DP
Dim x_cnt As Integer
Dim x_output, x_T As String
Dim x_my_len As Integer
On Error Resume Next
x_P = Array("", "Thousand ", "Million ", "Billion ", "Trillion ", " ", " ", " ", " ")
x_numb = Trim(Str(MyNumber))
x_DP = InStr(x_numb, ".")
x_pnt = ""
x_string_Num = ""
If x_DP > 0 Then
x_pnt = " point "
x_string = Mid(x_numb, x_DP + 1)
x_string_pnt = Left(x_string, Len(x_numb) - x_DP)
For whole_num = 1 To Len(x_string_pnt)
x_string = Mid(x_string_pnt, whole_num, 1)
x_pnt = x_pnt & get_digit(x_string) & " "
Next whole_num
x_numb = Trim(Left(x_numb, x_DP - 1))
End If
x_cnt = 0
x_output = ""
x_T = ""
x_my_len = 0
x_my_len = Int(Len(Str(x_numb)) / 3)
If (Len(Str(x_numb)) Mod 3) = 0 Then x_my_len = x_my_len - 1
Do While x_numb <> ""
If x_my_len = x_cnt Then
x_T = get_hundred_digit(Right(x_numb, 3), False)
Else
If x_cnt = 0 Then
x_T = get_hundred_digit(Right(x_numb, 3), True)
Else
x_T = get_hundred_digit(Right(x_numb, 3), False)
End If
End If
If x_T <> "" Then
x_output = x_T & x_P(x_cnt) & x_output
End If
If Len(x_numb) > 3 Then
x_numb = Left(x_numb, Len(x_numb) - 3)
Else
x_numb = ""
End If
x_cnt = x_cnt + 1
Loop
x_output = x_output & x_pnt
number_converting_into_words = x_output
End Function
Function get_hundred_digit(xHDgt, y_b As Boolean)
Dim x_R_str As String
Dim x_string_Num As String
Dim x_string As String
Dim y_I As Integer
Dim y_bb As Boolean
x_string_Num = xHDgt
x_R_str = ""
On Error Resume Next
y_bb = True
If Val(x_string_Num) = 0 Then Exit Function
x_string_Num = Right("000" & x_string_Num, 3)
x_string = Mid(x_string_Num, 1, 1)
If x_string <> "0" Then
x_R_str = get_digit(Mid(x_string_Num, 1, 1)) & "Hundred "
Else
If y_b Then
x_R_str = "and "
y_bb = False
Else
x_R_str = " "
y_bb = False
End If
End If
If Mid(x_string_Num, 2, 2) <> "00" Then
x_R_str = x_R_str & get_ten_digit(Mid(x_string_Num, 2, 2), y_bb)
End If
get_hundred_digit = x_R_str
End Function
Function get_ten_digit(x_TDgt, y_b As Boolean)
Dim x_string As String
Dim y_I As Integer
Dim x_array_1() As Variant
Dim x_array_2() As Variant
Dim x_T As Boolean
x_array_1 = Array("Ten ", "Eleven ", "Twelve ", "Thirteen ", "Fourteen ", "Fifteen ", "Sixteen ", "Seventeen ", "Eighteen ", "Nineteen ")
x_array_2 = Array("", "", "Twenty ", "Thirty ", "Forty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
x_string = ""
x_T = True
On Error Resume Next
If Val(Left(x_TDgt, 1)) = 1 Then
y_I = Val(Right(x_TDgt, 1))
If y_b Then x_string = "and "
x_string = x_string & x_array_1(y_I)
Else
y_I = Val(Left(x_TDgt, 1))
If Val(Left(x_TDgt, 1)) > 1 Then
If y_b Then x_string = "and "
x_string = x_string & x_array_2(Val(Left(x_TDgt, 1)))
x_T = False
End If
If x_string = "" Then
If y_b Then
x_string = "and "
End If
End If
If Right(x_TDgt, 1) <> "0" Then
x_string = x_string & get_digit(Right(x_TDgt, 1))
End If
End If
get_ten_digit = x_string
End Function
Function get_digit(xDgt)
Dim x_string As String
Dim x_array_1() As Variant
x_array_1 = Array("Zero ", "One ", "Two ", "Three ", "Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine ")
x_string = ""
On Error Resume Next
x_string = x_array_1(Val(xDgt))
get_digit = x_string
End Function
- Save the code.
- Go back to the Excel worksheet.
- Select the cell where you want to show the converted output. (In our case, cell C5).
- Enter the Equal sign (=) in the cell.
- Insert “=number_converting_into_words” or select the number_converting_into_words function from the drop-down menu after typing in the first few leters.
- Select the cell with the number value that you want to convert into words (In our case, cell B5).
- Hit the Enter button.
- You can use this formula just as any other so long as you’ve added the code to the sheet.
Read More: How to Convert Number to Words in Excel in Rupees
Method 4 – Employing VBA for Wording Currencies in Excel
Wording currencies requires a bit more modifications. Here’s an example output that we need.
- Follow Method 3 to insert the module.
- Insert one of the following code segments in the Module.
- Save the code and file.
- Use the functions as provided.
Code 1
Function Convert_Number_into_word_with_currency(ByVal whole_number)
Dim converted_into_dollar, converted_into_cent
my_ary = Array("", "", " Thousand ", " Million ", " Billion ", " Trillion ")
whole_number = Trim(Str(whole_number))
x_decimal = InStr(whole_number, ".")
If x_decimal > 0 Then
converted_into_cent = get_ten(Left(Mid(whole_number, x_decimal + 1) & "00", 2))
whole_number = Trim(Left(whole_number, x_decimal - 1))
End If
xIndex = 1
Do While whole_number <> ""
xHundred = ""
xValue = Right(whole_number, 3)
If Val(xValue) <> 0 Then
xValue = Right("000" & xValue, 3)
If Mid(xValue, 1, 1) <> "0" Then
xHundred = get_digit(Mid(xValue, 1, 1)) & " Hundred "
End If
If Mid(xValue, 2, 1) <> "0" Then
xHundred = xHundred & get_ten(Mid(xValue, 2))
Else
xHundred = xHundred & get_digit(Mid(xValue, 3))
End If
End If
If xHundred <> "" Then
converted_into_dollar = xHundred & my_ary(xIndex) & Dollar
End If
If Len(whole_number) > 3 Then
whole_number = Left(whole_number, Len(whole_number) - 3)
Else
whole_number = ""
End If
xIndex = xIndex + 1
Loop
Select Case converted_into_dollar
Case ""
converted_into_dollar = " Zero Dollar"
Case "One"
converted_into_dollar = " One Dollar"
Case Else
converted_into_dollar = converted_into_dollar & "Dollars"
End Select
Select Case converted_into_cent
Case ""
converted_into_cent = " and Zero Cent"
Case "One"
converted_into_cent = " and One Cent"
Case Else
converted_into_cent = " and " & converted_into_cent & "Cents"
End Select
Convert_Number_into_word_with_currency = converted_into_dollar & converted_into_cent
End Function
Function get_ten(pTens)
Dim my_output As String
my_output = ""
If Val(Left(pTens, 1)) = 1 Then
Select Case Val(pTens)
Case 10: my_output = "Ten"
Case 11: my_output = "Eleven"
Case 12: my_output = "Twelve"
Case 13: my_output = "Thirteen"
Case 14: my_output = "Fourteen"
Case 15: my_output = "Fifteen"
Case 16: my_output = "Sixteen"
Case 17: my_output = "Seventeen"
Case 18: my_output = "Eighteen"
Case 19: my_output = "Nineteen"
Case Else
End Select
Else
Select Case Val(Left(pTens, 1))
Case 2: my_output = "Twenty "
Case 3: my_output = "Thirty "
Case 4: my_output = "Forty "
Case 5: my_output = "Fifty "
Case 6: my_output = "Sixty "
Case 7: my_output = "Seventy "
Case 8: my_output = "Eighty "
Case 9: my_output = "Ninety "
Case Else
End Select
my_output = my_output & get_digit(Right(pTens, 1))
End If
get_ten = my_output
End Function
Function get_digit(pDigit)
Select Case Val(pDigit)
Case 1: get_digit = "One"
Case 2: get_digit = "Two"
Case 3: get_digit = "Three"
Case 4: get_digit = "Four"
Case 5: get_digit = "Five"
Case 6: get_digit = "Six"
Case 7: get_digit = "Seven"
Case 8: get_digit = "Eight"
Case 9: get_digit = "Nine"
Case Else: get_digit = ""
End Select
End Function
- You can use your defined function named Convert_Number_into_word_with_currency.
=Convert_Number_into_word_with_currency(B5)
- Use the Excel AutoFill Feature for the rest of cells C6:C9.
Code 2
Function ConvertNumberToWords(ByVal MyNumber) As String
Dim Units As String
Dim SubUnits As String
Dim DecimalPlace As Integer
Dim Count As Integer
Dim DecimalSeparator As String
Dim UnitName As String
Dim SubUnitName As String
Dim SubUnitNameAlt As String
' Change these values according to your requirements
DecimalSeparator = "."
UnitName = "US Dollars"
SubUnitName = "Cents"
SubUnitNameAlt = "Dollars"
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' Convert MyNumber to String
MyNumber = Trim(CStr(MyNumber))
' If MyNumber is blank, return zero
If MyNumber = "" Then
ConvertNumberToWords = "Zero"
Exit Function
End If
' Find position of decimal place, 0 if none.
DecimalPlace = InStr(MyNumber, DecimalSeparator)
' Convert SubUnits and set MyNumber to Units amount.
If DecimalPlace > 0 Then
SubUnits = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
TempStr = GetHundreds(Right(MyNumber, 3))
If TempStr <> "" Then
If Units <> "" Then
If Count = 1 And Len(MyNumber) > 3 Then
Units = TempStr & " and" & Units
Else
Units = TempStr & Place(Count) & Units
End If
Else
Units = TempStr & Place(Count)
End If
End If
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Dim Result As String
Result = Trim(Units & " " & IIf(Count > 2, SubUnitNameAlt, IIf(Count = 2, SubUnitName, UnitName)))
If SubUnits <> "" Then
Result = Result & IIf(Count > 1, " and", "") & " " & SubUnits & " " & SubUnitName
End If
ConvertNumberToWords = Result
End Function
Function GetHundreds(ByVal MyNumber) As String
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
Function GetTens(TensText) As String
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
Function GetDigit(Digit) As String
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 the function ConvertNumberToWords(cell_reference) where you need it.
Read More: How to Use Spell Number in Excel
How to Convert Number Format to Text Format in Excel
- Select the cell or cells with numeric values that you want to convert into text (in our case, cells C5:C9)
- Go to the Home tab and select the Text option from the cell category drop-down menu under the Number section.
- Texts are left-aligned and numbers are right-aligned in Excel.
Alternatively, press Ctrl + 1 to open the window named Format Cells and select the Number option, then select the Text category from there.
Practice Section
We have added a Practice portion on each sheet on the right so you can test these methods.
Download the Practice Workbook
Related Articles
- Convert Number to Words in Excel Without VBA
- [Solved] Spell Number Not Working in Excel
- How to Spell Number Without Currency in Excel
- How to Spell Number in Taka in Excel
- How to Spell Number in Dirhams in Excel
<< Go Back to Spell Number in Excel | Convert Number to Text | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!
x_array_1 = Array(“Ten “, “Eleven “, “Twelve “, “Thirteen “, “Fourteen “, “Fifteen “, “Sixteen “, “Seventeen “, “Eighteen “, “Nineteen “)
Hi!!
I have entered the whole code but when I try to apply i got an error message in the above line. It highlight the “, ” between “Thirteen “, “Fourteen “,
Please kindly assist
Hello VULSTA KUZENA,
Thanks for your comment. In my case, the code runs just perfect. I have not got any error message. There might have some extra characters in that place. You can try it or send me the file to [email protected] to let me have a try.
100000= one hundred thousand
but i need to convert “one lac”.
how can i do that.
Hello Arif,
Thank you for sharing your query with us. As per your question, there can be 2 solutions to the problem.
1. If your number is 100000, then convert it to One Lac with this formula where Thousand is kept blank.
=CHOOSE(LEFT(TEXT(H6,"000000000.00"))+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--LEFT(TEXT(H6,"000000000.00"))=0,,IF(AND(--MID(TEXT(H6,"000000000.00"),2,1)=0,--MID(TEXT(H6,"000000000.00"),3,1)=0)," Lac"," Lac and ")) &CHOOSE(MID(TEXT(H6,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(H6,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT(H6,"000000000.00"),3,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"), CHOOSE(MID(TEXT(H6,"000000000.00"),3,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen")) &IF((--LEFT(TEXT(H6,"000000000.00"))+MID(TEXT(H6,"000000000.00"),2,1)+MID(TEXT(H6,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT(H6,"000000000.00"),4,1)+MID(TEXT(H6,"000000000.00"),5,1)+MID(TEXT(H6,"000000000.00"),6,1)+MID(TEXT(H6,"000000000.00"),7,1))=0,(--MID(TEXT(H6,"000000000.00"),8,1)+RIGHT(TEXT(H6,"000000000.00")))>0)," Crore and "," Crore ")) &CHOOSE(MID(TEXT(H6,"000000000.00"),4,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(H6,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT(H6,"000000000.00"),5,1)=0,--MID(TEXT(H6,"000000000.00"),6,1)=0)," Lac"," Lac")) &CHOOSE(MID(TEXT(H6,"000000000.00"),5,1)+1,,," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety") &IF(--MID(TEXT(H6,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT(H6,"000000000.00"),6,1)+1,," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"),CHOOSE(MID(TEXT(H6,"000000000.00"),6,1)+1," Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen")) &IF((--MID(TEXT(H6,"000000000.00"),4,1)+MID(TEXT(H6,"000000000.00"),5,1)+MID(TEXT(H6,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT(H6,"000000000.00"),7,1)+MID(TEXT(H6,"000000000.00"),8,1)+MID(TEXT(H6,"000000000.00"),9,1))=0,--MID(TEXT(H6,"000000000.00"),7,1)<>0)," "," ")) &CHOOSE(MID(TEXT(H6,"000000000.00"),7,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(H6,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT(H6,"000000000.00"),8,1)=0,--MID(TEXT(H6,"000000000.00"),9,1)=0)," Hundred "," Hundred and "))& CHOOSE(MID(TEXT(H6,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(H6,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT(H6,"000000000.00"),9,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(H6,"000000000.00"),9,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"))
2. If your number is 123450, convert it into a word with this formula.
=CHOOSE(LEFT(TEXT(H6,"000000000.00"))+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--LEFT(TEXT(H6,"000000000.00"))=0,,IF(AND(--MID(TEXT(H6,"000000000.00"),2,1)=0,--MID(TEXT(H6,"000000000.00"),3,1)=0)," Lac"," Lac and ")) &CHOOSE(MID(TEXT(H6,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(H6,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT(H6,"000000000.00"),3,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"), CHOOSE(MID(TEXT(H6,"000000000.00"),3,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen")) &IF((--LEFT(TEXT(H6,"000000000.00"))+MID(TEXT(H6,"000000000.00"),2,1)+MID(TEXT(H6,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT(H6,"000000000.00"),4,1)+MID(TEXT(H6,"000000000.00"),5,1)+MID(TEXT(H6,"000000000.00"),6,1)+MID(TEXT(H6,"000000000.00"),7,1))=0,(--MID(TEXT(H6,"000000000.00"),8,1)+RIGHT(TEXT(H6,"000000000.00")))>0)," Crore and "," Crore ")) &CHOOSE(MID(TEXT(H6,"000000000.00"),4,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(H6,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT(H6,"000000000.00"),5,1)=0,--MID(TEXT(H6,"000000000.00"),6,1)=0)," Lac"," Lac")) &CHOOSE(MID(TEXT(H6,"000000000.00"),5,1)+1,,," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety") &IF(--MID(TEXT(H6,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT(H6,"000000000.00"),6,1)+1,," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"),CHOOSE(MID(TEXT(H6,"000000000.00"),6,1)+1," Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen")) &IF((--MID(TEXT(H6,"000000000.00"),4,1)+MID(TEXT(H6,"000000000.00"),5,1)+MID(TEXT(H6,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT(H6,"000000000.00"),7,1)+MID(TEXT(H6,"000000000.00"),8,1)+MID(TEXT(H6,"000000000.00"),9,1))=0,--MID(TEXT(H6,"000000000.00"),7,1)<>0)," "," ")) &CHOOSE(MID(TEXT(H6,"000000000.00"),7,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(H6,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT(H6,"000000000.00"),8,1)=0,--MID(TEXT(H6,"000000000.00"),9,1)=0)," Hundred "," Hundred and "))& CHOOSE(MID(TEXT(H6,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(H6,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT(H6,"000000000.00"),9,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(H6,"000000000.00"),9,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"))
I hope this solution will help you. Let us know your feedback.
Regards,
Guria
ExcelDemy
Hi, this is excellent. Just one query…
I used Solution 3: Using a VBA to convert Number to words in Excel
I’d like to output “nil” or “zero” when I enter the digit zero 0. At present, when I enter 0 in the cell, nothing gets outputted as text.
For example; if A1=0, B1=number_converting_into_words(A1) outputs no text. No error, it’s just blank.
Any ideas where I can change this in the code?
Dear Damien,
Thank you for your comment. To get “zero” or “Nil” for the value 0, you have to simply add an IF statement with the code.
you can use the following code:
Best,
Afia Aziz Kona
Tank you for that best work… really thats help me thanks
Dear Mody,
Thanks for your appreciation.
Regards
Shamima Sultana | Project Manager | ExcelDemy
Dear mem,
Both are same formula when I apply those formula it given me “Twenty One Six Hundred and Twenty Nine” against number of 21,629.
I need this format “Twenty One Thousand Six Hundred and Twenty Nine Taka Only”
Plz check it & help me.
Dear MD. KAMAL HOSSAIN,
To obtain your required format please follow the following simple steps:
From your Excel Workbook, press ALT + F11 to open Visual Basic Editor.
Insert a module.
Paste the following code:
Now, return to your worksheet. Type in the following formula in the cell where you require the output and press Enter key.
=NumberToWords(B5) & ” Taka Only”
Here, B5 indicates the reference of the cell where you have the input number.
I hope this solution will be sufficient for your requirements. Let us know your feedback.
Regards,
ExcelDemy
I want to implement convert formula in all excel sheets. Requested to please furnish me the way.
Dear MUHAMMAD,
In order to apply the number to words conversion in all worksheets of a particular workbook., you can create a function and place it in a module. As you have created a function in a module, it will be available in all worksheets of that particular workbook.
Like I have created a module and a function named number_converting_into_words with the following VBA code.
Now, you can call the function in all worksheets of that particular workbook in the following way and have your number converted into words.
I hope you have found your desired answer.
Your regards,
Naimul Hasan Arif
Thanks a lot for this.
When I used the module 2 code, the converted word didn’t come out complete. 99,756.86 came out as ninety nine thousand naira eight six kobo
I had changed dollar to my currency in module 2 code. Could that be the problem?
Dear Max,
Thank you for your query. Changing the currency is not the reason behind the incorrect output of the module 2 code. Actually, the code is not working for the last 3 digits of the whole number part. Here is the modified code of module 1 that may help you. This will give the correct result hopefully.
Copy the code in your module and Run the code.
I hope you have got your problem solved. Thank you.
Regards
Mahfuza Anika Era
ExcelDemy
Thank You
Hello Abinsh,
You are most welcome.
Regards
ExcelDemy
If I would apply 123,456.12 into wordings “One Hundred And Twenty Three Thousand Four Hundred And Fifty Six And Cents Twelve Only”
I would like the wording “One Hundred And Twenty Three Thousand Four Hundred And Fifty Six And Cents Twelve Only” instead of “Hong Kong Dollars One Hundred and Twenty Three Thousand Four Hundred and Fifty Six point One Two Only”
May i have the VBA code to apply? A million thanks.
Dear Salad,
Thanks for your question. Here is the VBA code that will give you your mentioned output.
Following is the output after using the code.
Regards
Mahfuza Anika Era
ExcelDemy
pls can you send me simple formula to change number to word
Dear Amir
You have to use either the combined formula or the vba code. Because converting number to words maintaing the place vaule is not possible by simple formula.
Regards
ExcelDemy
The problem I’m facing is seen below:
934,738.22 – “Nine Hundred Thirty Four Thousand Cedis and Twenty Two Pesewas”
instead of “Nine Hundred and Thirty Four Thousand Seven Hundred and Thirty Eight Cedis and Twenty Two Pesewas”
3,308,611.99 – “Three Million Three Hundred Cedis and Ninety Nine Pesewas”
instead of “Three Million Three Hundred and Eight Thousand Six Hundred and Eleven Cedis and Ninety Nine Pesewas”
Hi FELIX,
Thanks for your comment. To get your desired output, you need to use the VBA code given below. We have created a custom function to convert numbers to currency words.
1. Copy the VBA code and paste it into the Module window.
2. Press Ctrl+S to save the code.
3. Now, insert the formula in Cell C3 and press Enter.
=ConvertNumberToWords(B3)
I hope this code will give you the desired output. If you have any other queries, please let me know in the comment section.
Regards
Mursalin,
ExcelDemy.
The problem I’m facing is seen below:
934,738.22 – “Ringgit Malaysia: Nine Hundred Thirty Four Thousand and Twenty Two Sen Only”
3,308,611.99 – “Ringgit Malaysia: Three Million Three Hundred and Ninety Nine Sen Only”
Hi HONG,
Thanks for your comment. You can use the VBA code given below for the desired output.
1. Copy the VBA code and paste it into the Module window.
2. Press Ctrl+S to save the code.
3. Now, insert the formula in Cell C3 and press Enter.
=ConvertNumberToWords(B3)
I hope this code will solve your problem. If you have any other queries, please let me know in the comment section.
Regards
Mursalin,
ExcelDemy.
How can I get –
10245 as “One Zero Two Four Five” and so on
Hello Samir
Thanks for visiting our blog and posting an interesting comment. You want to convert a number (e.g., 10245) into a string where each digit of the number is represented by its word form (e.g., “One Zero Two Four Five”).
I am delighted to inform you that I have developed an Excel VBA User-defined function named NumberToString to fulfil your goal. I am using the function in a Sub-procedure. However, you can also use it in Excel cells like other worksheet functions.
OUTPUT OVERVIEW:
Excel VBA Code:
Hopefully, the user-defined function will help you reach your goal; good luck.
Regards
Lutfor Rahman Shimanto
Excel & VBA Developer
ExcelDemy
Hi, Chinmoy Mondol, It’s an excellent article. Great job! However, when I copied the formula from method 1, it showed an error in Excel. I believe it has problems with line spacing or the quotation mark. Kindly check the formula.
Hello EXCELFLASH
Thanks a ton for taking the time to dive into our article and sharing your thoughts! We’re thrilled to hear that you found it excellent overall – that means a lot to us.
We’re sorry you encountered an issue with the formula from method 1. After investigating, we discovered that you are correct about the line spacing and quotation marks issues in that formula when copying.
We’ve updated the article, so feel free to retry it. Hopefully, this time around, you won’t encounter the same hassle with the formula. Let us know if you have any further questions or suggestions.
Regards
Lutfor Rahman Shimanto
ExcelDemy
I want to convert whole numbers in word
like the numbers 54362543 is showing “Fifty Four Million Three Hundred and Sixty Two Thousand Five Hundred and Forty Three” but i want to conver in “five crore fourty three lac sixty two thousand five hundred forty three”
Hi DINESH,
Thanks for your comment. You can use the VBA code given below for the desired output.
I hope this user-defined function will solve your problem. Please let us know in the comment section if you have any other queries.
Regards
Maruf Hasan
ExcelDemy
Thanks for this excellent article.
I suggest another code approach. It basically relies on a field feature in Word that allows this conversion.
In word, the field is for example {= 1234 \*CardText}. This field will display the number (here 1234) into letters. Furthermore the output will be in the language selected in the document.
Thus the excel vba code creates this field in a new word document and retreive the result.
Here is the vba code (to be inserted in a new vba module) :
Public Function NombreEnLettres(Number As Double, Optional Language As String = “EN”) As String
Dim WDoc As Word.Document
Dim WField As Field
Dim WLanguage As WdLanguageID
Set WDoc = CreateObject(“Word.Document”)
Select Case Langue
Case “EN”
WDoc.Range.LanguageID = wdEnglishUK
Case “FR”
WDoc.Range.LanguageID = wdFrench
Case Else
WDoc.Range.LanguageID = wdEnglishUK
End Select
Set WField = WDoc.Fields.Add(Range:=WDoc.Range, Type:=wdFieldExpression, Text:=Number & ” \*CardText”)
NombreEnLettres = WField.Result
Set WDoc = Nothing
End Function
My user-defined function is named in French, but you may change it.
The “Select Case” code is to prevent errors. Here it only handles EN and FR languages (with EN by default) but there is a whole bunch of other ones available.
Regards,
Gwenn
Hello Gwenn,
Thanks for your suggestion. We deeply appreciate the solution provided in the comments. Thank you for your helpful contribution!
Regards
ExcelDemy