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

Is there function in excel that can convert number from figure to words? When we type to A1 "1,000.20" B2 returns "One Thousand Pesos and 20 Cents" hope you could help me. I searched in help but after searchig for 2 hours I never found anything.

2007-11-21 12:57:31 · 4 answers · asked by Chris CPA 1 in Computers & Internet Programming & Design

4 answers

Right click the cell then chose "format cells". Then click the "Number" tab. Then try the various options to find the one you want.

2007-11-21 13:13:05 · answer #1 · answered by Tim C 7 · 0 4

Use this VBA Function to do it, you can also use format, and do custom, and and do it like this ###########.## "Pesos" It is not going to be in words though. Try this, if you have any questions, email me.


Function ConvertCurrencyToEnglish (ByVal MyNumber)
Dim Temp
Dim Dollars, Cents
Dim DecimalPlace, Count

ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "

MyNumber = Trim(Str(MyNumber))

DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
Temp = Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2)
Cents = ConvertTens(Temp)

MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If

Count = 1
Do While MyNumber <> ""
Temp = ConvertHundreds(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 Pesos"
Case "One"
Dollars = "One Peso"
Case Else
Dollars = Dollars & " Pesos"
End Select

Select Case Cents
Case ""
Cents = " And No Cents"
Case "One"
Cents = " And One Cent"
Case Else
Cents = " And " & Cents & " Cents"
End Select

ConvertCurrencyToEnglish = Pesos & Cents
End Function



Private Function ConvertHundreds (ByVal MyNumber)
Dim Result As String

If Val(MyNumber) = 0 Then Exit Function

MyNumber = Right("000" & MyNumber, 3)

If Left(MyNumber, 1) <> "0" Then
Result = ConvertDigit(Left(MyNumber, 1)) & " Hundred "
End If

If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & ConvertTens(Mid(MyNumber, 2))
Else
Result = Result & ConvertDigit(Mid(MyNumber, 3))
End If

ConvertHundreds = Trim(Result)
End Function



Private Function ConvertTens (ByVal MyTens)
Dim Result As String

If Val(Left(MyTens, 1)) = 1 Then
Select Case Val(MyTens)
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
Select Case Val(Left(MyTens, 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 & ConvertDigit(Right(MyTens, 1))
End If

ConvertTens = Result
End Function



Private Function ConvertDigit (ByVal MyDigit)
Select Case Val(MyDigit)
Case 1: ConvertDigit = "One"
Case 2: ConvertDigit = "Two"
Case 3: ConvertDigit = "Three"
Case 4: ConvertDigit = "Four"
Case 5: ConvertDigit = "Five"
Case 6: ConvertDigit = "Six"
Case 7: ConvertDigit = "Seven"
Case 8: ConvertDigit = "Eight"
Case 9: ConvertDigit = "Nine"
Case Else: ConvertDigit = ""
End Select
End Function

2007-11-25 03:18:00 · answer #2 · answered by Anonymous · 0 0

The specifics of a thank you to do this selection based on the way you have the suggestions arranged. Assuming you have each and every price occupying a single row, and your debits in separate columns in that row, you need to circulate right into a formulation to SUM($??:$??), the place ?? = The beginning cellular for debits for this price (IE. B2) and the 2nd ?? = the ending cellular (IE. H2).

2016-12-16 15:44:14 · answer #3 · answered by Anonymous · 0 0

yes there is but is not built-in excel... its a macro add-on. its available in the net (you have to search for it, i found it before but i forgot the site) but only in dollars. you can edit the macro though... needs a bit of programming know-how.

2007-11-21 13:08:33 · answer #4 · answered by omigodgem 4 · 0 0

fedest.com, questions and answers