How to Convert Numbers into Words in Excel

Convert number into word in Excel you can convert numbers in spell example 1510 One Thousand Five Hundred Ten Only like this. For use this feature we need to create a function this function work in all excel version Microsoft Excel 2003, 2007, 2010, 2013,

How to convert numbers into word in excel automatically?

Follow Below step for use number to word converting function.

Open excel File Press Alt+F11 a new windows will appear (Microsoft visual basic).


Now in new window press Insert option and then Module.


Now copy below given code and past in window which opened by press Insert > module.
Function SpellNum(amt As Variant) As Variant
Dim FIGURE As Variant
Dim LENFIG As Integer
Dim i As Integer
Dim WORDs(19) As String
Dim tens(9) As String
WORDs(1) = "One"
WORDs(2) = "Two"
WORDs(3) = "Three"
WORDs(4) = "Four"
WORDs(5) = "Five"
WORDs(6) = "Six"
WORDs(7) = "Seven"
WORDs(8) = "Eight"
WORDs(9) = "Nine"
WORDs(10) = "Ten"
WORDs(11) = "Eleven"
WORDs(12) = "Twelve"
WORDs(13) = "Thirteen"
WORDs(14) = "Fourteen"
WORDs(15) = "Fifteen"
WORDs(16) = "Sixteen"
WORDs(17) = "Seventeen"
WORDs(18) = "Eighteen"
WORDs(19) = "Nineteen"
tens(2) = "Twenty"
tens(3) = "Thirty"
tens(4) = "Fourty"
tens(5) = "Fifty"
tens(6) = "Sixty"
tens(7) = "Seventy"
tens(8) = "Eighty"
tens(9) = "Ninety"
FIGURE = amt
FIGURE = Format(FIGURE, "FIXED")
FIGLEN = Len(FIGURE)
If FIGLEN < 12 Then
FIGURE = Space(12 - FIGLEN) & FIGURE
End If
If Val(Left(FIGURE, 9)) > 1 Then
SpellNum = ""
ElseIf Val(Left(FIGURE, 9)) = 1 Then
SpellNum = ""
End If
For i = 1 To 3
If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
SpellNum = SpellNum & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNum = SpellNum & tens(Val(Left(FIGURE, 1)))
SpellNum = SpellNum & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If
If i = 1 And Val(Left(FIGURE, 2)) > 0 Then
SpellNum = SpellNum & " Crore "
ElseIf i = 2 And Val(Left(FIGURE, 2)) > 0 Then
SpellNum = SpellNum & " Lakh "
ElseIf i = 3 And Val(Left(FIGURE, 2)) > 0 Then
SpellNum = SpellNum & " Thousand "
End If
FIGURE = Mid(FIGURE, 3)
Next i
If Val(Left(FIGURE, 1)) > 0 Then
SpellNum = SpellNum & WORDs(Val(Left(FIGURE, 1))) + " Hundred "
End If
FIGURE = Mid(FIGURE, 2)
If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
SpellNum = SpellNum & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNum = SpellNum & tens(Val(Left(FIGURE, 1)))
SpellNum = SpellNum & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If
FIGURE = Mid(FIGURE, 4)
If Val(FIGURE) > 0 Then
SpellNum = SpellNum & " Paise "
If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
SpellNum = SpellNum & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNum = SpellNum & tens(Val(Left(FIGURE, 1)))
SpellNum = SpellNum & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If
End If
FIGURE = amt
FIGURE = Format(FIGURE, "FIXED")
If Val(FIGURE) > 0 Then
SpellNum = SpellNum & " Only "
End If
End Function

After Past Code close this window.


Now come to excel sheet and save this excel sheet.

Note while saving excel sheet it will ask saving a macro free workbook Click Yes Button.


Now your excel file is ready to use for convert number to spell.

New Function Name is SpellNum.

Use Function Like this

=SpellNum(cell Address) press Enter.



Output Result
Note: If you don’t want to show Only Word in end remove this from code.
SpellNum = SpellNum & " Only " Remove this Only word from the code.

Share this

Related Posts

Previous
Next Post »