English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I did a Google search on this and found out about a function called "=SpellNumber (32.50)" but when I used that on my spreadsheet nothing happened. Is there something I'm doing wrong? I know this is the most up-to-date version of Excel (besides Vista), but that doesn't matter because the articles I found with the SpellNumber function were created prior to Vista.

2007-01-31 01:27:32 · 6 answers · asked by duped4thelasttime 3 in Computers & Internet Software

6 answers

If you used that function in the spreadsheet, and it displays #NAME? as a result, then you did not add the FUNCTION to your speadsheet.

You see, "=SpellNumber (32.50)" only calls the function that you have to add. GO BACK to that website and look for the function that you have to add.

Good luck and Happy Computing!

2007-01-31 01:33:49 · answer #1 · answered by Anonymous · 1 1

U mean Spell a Number as 1=One, 2=Two lik that. U need to Create a Function in Excel, and Use It. For More Inforamtion i answered the same Question earlier also . Check with it.

2016-03-15 02:47:10 · answer #2 · answered by Anonymous · 0 0

There isn't anything built-in, but there are (as you found) several VBA (Visual Basic for Applications) programs that do this.

You'll need to get the code provided and paste in into a "macro" in Excel. I won't go into the details on how to do this here, but check the help.

A good article that explains how to do this is http://support.microsoft.com/kb/213360.

2007-01-31 01:37:28 · answer #3 · answered by Jay 7 · 1 0

Highlight the cells with the numbers inthem that you want to convert then right click on them and select Format Cells then select text.

2007-01-31 01:34:27 · answer #4 · answered by a1222256 4 · 1 1

You will need to do this in every file you want to use that function SpellNumber

1- Press ALT+F11
2- In Project Explorer, add new module (Insert > Module)
3- In that white area (Code area) paste this

Function SpellNumber(ByVal MyNumber)
Dim Dollars, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' String representation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert cents and set MyNumber to dollar amount.
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Dollars
Case ""
Dollars = "No Dollars"
Case "One"
Dollars = "One Dollar"
Case Else
Dollars = Dollars & " Dollars"
End Select
Select Case Cents
Case ""
Cents = " and No Cents"
Case "One"
Cents = " and One Cent"
Case Else
Cents = " and " & Cents & " Cents"
End Select
SpellNumber = Dollars & Cents
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

4- Close the VBA window
5- Now, select an empty cell
6- Go to Insert > function > User-Defined functions > SpellNumber
7- Enter the parameters
8- Press Enter
9- You may need to Enable the macros at every time you open this file
10- repeat these step for [EVERY] file you want to use SpellNumber on.


Enjoy my profile, I am the VBAXLMan

2007-02-02 20:30:48 · answer #5 · answered by Anonymous · 0 1

Try Using the TEXT(value,format string)

TEXT(32.50,"#0.00") will return "32.50" but as a text

2007-01-31 03:45:38 · answer #6 · answered by pivot_me 1 · 1 1

fedest.com, questions and answers