A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi NitinKumar Rohit
Thank you for using Microsoft products and posting in the community.
I know you've encountered a excel issue.
Excel does not have such function for the time being, you can use VBA macro to create custom function. Here are the steps on how to add English spelling numbers in Excel:
- Create VBA macros to convert numbers to English spelling
Steps:
Open the Excel file.
Press Alt + F11 to open the VBA editor.
In the VBA editor, click Insert -> Module in the upper left corner.
Paste the following code into the module:
Function NumToWords(ByVal MyNumber)
Dim Units As String
Dim SubUnits As String
Dim TempStr As String
Dim DecimalSeparator As String
Dim DecimalSeparatorPos As Integer
Dim DecimalPlace As Integer
Dim i As Integer
Dim TempStr2 As String
Dim Num As Double
Dim ChnUnit As String
Dim ChnNum As String
Dim NumArray As Variant
Dim UnitArray As Variant
Num = MyNumber
NumArray = Array("", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", _
"Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", _
"Eighteen", "Nineteen", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", _
"Eighty", "Ninety")
UnitArray = Array("", "Thousand", "Million", "Billion", "Trillion")
TempStr = ""
DecimalSeparator = "."
DecimalSeparatorPos = InStr(1, MyNumber, DecimalSeparator)
If DecimalSeparatorPos > 0 Then
SubUnits = Mid(MyNumber, DecimalSeparatorPos + 1, Len(MyNumber))
MyNumber = Left(MyNumber, DecimalSeparatorPos - 1)
End If
TempStr2 = ""
i = 0
If MyNumber = 0 Then
TempStr2 = "Zero"
End If
Do While MyNumber > 0
TempStr = ""
TempNum = Int(MyNumber Mod 1000)
If TempNum > 0 Then
If TempNum > 99 Then
TempStr = NumArray(Int(TempNum / 100)) & " Hundred "
TempNum = TempNum Mod 100
End If
If TempNum > 20 Then
TempStr = TempStr & NumArray(Int(TempNum / 10) + 18) & " "
TempNum = TempNum Mod 10
End If
If TempNum > 0 Then
TempStr = TempStr & NumArray(TempNum) & " "
End If
TempStr2 = TempStr & UnitArray(i) & " " & TempStr2
End If
MyNumber = Int(MyNumber / 1000)
i = i + 1
Loop
NumToWords = Trim(TempStr2)
End Function
Remember to save the code, and then enter the function = NumToWords( xx ) in the excel sheet.
Hope this helps, let me know if this is contrary to what you need.
Sincere greetings.
Petter.Y - MSFT | Microsoft Community Support Specialist.