excel货币数字转换成英文怎么说
❶ EXCEL公式 数字金额转换英文
excel 之家找到的,新建个模块把下面代码,复制
以后在单元格输入
=SpellNumber(单元格号)
就可以了,还有例子文件,你可以自己下,我这也有,要HI我,发给你
'****************' Main Function *'****************
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
❷ 如何在EXCEL中将数字转换成英文字母
1.创建一个模块: 在SHEET上,右键-》查看代码。选中“模块”-》插入模块。2.写代码:Option Explicit
Dim StrNO(19) As String
Dim Unit(8) As String
Dim StrTens(9) As StringPublic Function NumberToString(Number As Double) As String
Dim Str As String, BeforePoint As String, AfterPoint As String, tmpStr As String
Dim Point As Integer
Dim nBit As Integer
Dim CurString As String
Dim nNumLen As Integer
Dim T As String
Call Init Str = CStr(Round(Number, 2))
' Str = Number
If InStr(1, Str, ".") = 0 Then
BeforePoint = Str
AfterPoint = ""
Else
BeforePoint = Left(Str, InStr(1, Str, ".") - 1)
T = Right(Str, Len(Str) - InStr(1, Str, "."))
If Len(T) < 2 Then AfterPoint = Val(T) * 10
If Len(T) = 2 Then AfterPoint = Val(T)
If Len(T) > 2 Then AfterPoint = Val(Left(T, 2))
End If If Len(BeforePoint) > 12 Then
NumberToString = "Too Big."
Exit Function
End If
Str = ""
Do While Len(BeforePoint) > 0
nNumLen = Len(BeforePoint)
If nNumLen Mod 3 = 0 Then
CurString = Left(BeforePoint, 3)
BeforePoint = Right(BeforePoint, nNumLen - 3)
Else
CurString = Left(BeforePoint, (nNumLen Mod 3))
BeforePoint = Right(BeforePoint, nNumLen - (nNumLen Mod 3))
End If
nBit = Len(BeforePoint) / 3
tmpStr = DecodeHundred(CurString)
If (BeforePoint = String(Len(BeforePoint), "0") Or nBit = 0) And Len(CurString) = 3 Then
If CInt(Left(CurString, 1)) <> 0 And CInt(Right(CurString, 2)) <> 0 Then
'tmpStr = Left(tmpStr, InStr(1, tmpStr, Unit(4)) + Len(Unit(4))) & Unit(8) & " " & Right(tmpStr, Len(tmpStr) - (InStr(1, tmpStr, Unit(4)) + Len(Unit(4))))
Else 'If CInt(Left(CurString, 1)) <> 0 And CInt(Right(CurString, 2)) = 0 Then
'tmpStr = Unit(8) & " " & tmpStr
End If
End If If nBit = 0 Then
Str = Trim(Str & " " & tmpStr)
Else
Str = Trim(Str & " " & tmpStr & " " & Unit(nBit))
End If
If Left(Str, 3) = Unit(8) Then Str = Trim(Right(Str, Len(Str) - 3))
If BeforePoint = String(Len(BeforePoint), "0") Then Exit Do
'Debug.Print Str
Loop
BeforePoint = Str If Len(AfterPoint) > 0 Then
AfterPoint = Unit(8) & " " & Unit(7) & " " & DecodeHundred(AfterPoint) & " " & Unit(5)
Else
AfterPoint = Unit(5)
End If
NumberToString = BeforePoint & " " & AfterPoint
End Function
Private Function DecodeHundred(HundredString As String) As String
Dim tmp As Integer
If Len(HundredString) > 0 And Len(HundredString) <= 3 Then
Select Case Len(HundredString)
Case 1
tmp = CInt(HundredString)
If tmp <> 0 Then DecodeHundred = StrNO(tmp)
Case 2
tmp = CInt(HundredString)
If tmp <> 0 Then
If (tmp < 20) Then
DecodeHundred = StrNO(tmp)
Else
If CInt(Right(HundredString, 1)) = 0 Then
DecodeHundred = StrTens(Int(tmp / 10))
Else
DecodeHundred = StrTens(Int(tmp / 10)) & "-" & StrNO(CInt(Right(HundredString, 1)))
End If
End If
End If
Case 3
If CInt(Left(HundredString, 1)) <> 0 Then
DecodeHundred = StrNO(CInt(Left(HundredString, 1))) & " " & Unit(4) & " " & DecodeHundred(Right(HundredString, 2))
Else
DecodeHundred = DecodeHundred(Right(HundredString, 2))
End If
Case Else
End Select
End IfEnd Function
Private Sub Init()
If StrNO(1) <> "One" Then
StrNO(1) = "One"
StrNO(2) = "Two"
StrNO(3) = "Three"
StrNO(4) = "Four"
StrNO(5) = "Five"
StrNO(6) = "Six"
StrNO(7) = "Seven"
StrNO(8) = "Eight"
StrNO(9) = "Nine"
StrNO(10) = "Ten"
StrNO(11) = "Eleven"
StrNO(12) = "Twelve"
StrNO(13) = "Thirteen"
StrNO(14) = "Fourteen"
StrNO(15) = "Fifteen"
StrNO(16) = "Sixteen"
StrNO(17) = "Seventeen"
StrNO(18) = "Eighteen"
StrNO(19) = "Nineteen" StrTens(1) = "Ten"
StrTens(2) = "Twenty"
StrTens(3) = "Thirty"
StrTens(4) = "Forty"
StrTens(5) = "Fifty"
StrTens(6) = "Sixty"
StrTens(7) = "Seventy"
StrTens(8) = "Eighty"
StrTens(9) = "Ninety" Unit(1) = "Thousand" '材?熌??
Unit(2) = "Million" '材?熌??
Unit(3) = "Billion" '材?熌??
Unit(4) = "Hundred"
Unit(5) = "Only"
Unit(6) = "Point"
Unit(7) = "Cents"
Unit(8) = "And"
End If
End Sub保存此代码到本地3.模块中已经定义了函数名称:NumberToString直接当作EXCEL本地函数使用,例如在A1=7,在B1中输入=NumberToString(A1)就可以拉!
❸ EXCEL里如何把数字金额转换成英文金额
选择要转的单元格,右键,设置单元格格式,数字,分类里的货币项,里面有你要的配置。
❹ Excel中怎么将一个单元格中的金额数字转换成英文大写金额
英文金额没大写,只有中国有大写,你的意识是前面加美元或者英镑的符号?单元格式里面点货币,各种货币格式都有
❺ 如何在excel中设置公式将数字转换为英文大写金额
使用数字转英文货币大写“自定义函数”,具体使用方法如下:
所需材料:Excel、数字转英文货币大写自定义函数(可通过网络复制粘贴)。
一、首先打开Excel表格文件,按Alt+F11打开VBA窗口,插入一个“模块”。
❻ 请问在excel表格中,怎样把钱数由数字变换成英文单词表示,比如说456,直接转换成four hundred fivty-six
这个有点麻烦哦。不过做一次,以后一劳永逸。
启动 Microsoft Excel。
按 Alt+F11 启动 Visual Basic 编辑器。
在“插入”菜单上,单击“模块”。
在模块表中键入下面的代码。
Option Explicit
'Main Function
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
如何使用 SpellNumber 示例函数要使用该示例函数将某数字更改为书面文本,请使用下列示例中演示的方法之一:方法 1:直接输入通过将下面的公式输入单元格中,可以将 32.50 更改为“Thirty Two Dollars and Fifty Cents”:
=SpellNumber(32.50)
方法 2:单元格引用可以引用工作簿中的其他单元格。例如,在单元格 A1 中输入数字 32.50,然后在另一单元格中键入下面的公式:
=SpellNumber(A1)
方法 3:粘贴函数或插入函数可以使用“粘贴函数”(在 Excel 2000 和 Excel 2002 中)或“插入函数”(在 Excel 2003 中)来将自定义函数输入工作表中。Excel 2000 和 Excel 2002要使用“粘贴函数”,请按照下列步骤操作:
选择所需的单元格。
单击“常用”工具栏中的“粘贴函数”。
在“函数类别”下,单击“用户定义”。
在“函数名称”下,单击“SpellNumber”,然后单击“确定”。
输入所需的数字或单元格引用,然后单击“确定”。
单击“完成”。
Excel 2003要使用“插入函数”,请按照下列步骤操作:
选择所需的单元格。
单击“常用”工具栏中的“插入函数”。
在“或选择类别”下,单击“用户定义”。
在“选择函数”列表中,单击“SpellNumber”,然后单击“确定”。
输入所需的数字或单元格引用,然后单击“确定”。
❼ 如何将EXCEL里的数字金额自动转换为英文金额希望各位高手帮忙
右键“设置单元格格式”
❽ excel里如何把数字转换成英文货币表达
看这里吧,微软的帮助
http://support.microsoft.com/kb/213360
不过结果跟你的要求少有不同
=SpellNumber(200)
显示
Two Hundred Dollars and No Cents
❾ 请教各位大侠,如何在excel中将金额的数字转换为英文大写,比如21转为TWENTY ONE,多谢
需要用到宏。你会吗?
把下面的宏放在模块中,就可以在 Excel 中用.
比如说输入公式: =NumToEng(1234) 会得出: One Thousand Two Hundred Thirty Four
(只能是整数,因为小数涉及到不同单位,不同说法的问题,如元角分)
Function NumToEng(Num)
Num = Int(Num)
Dim Tri(5) As String
Tri(1) = ""
Tri(2) = " Thousand "
Tri(3) = " Million "
Tri(4) = " Billion "
Tri(5) = " Trillion "
NumToEng = ""
Txt = Trim(Str(Num))
Count = 1
Do While Txt <> ""
Tmp = Get000(Num000:=Val(Right(Txt, 3)))
If Tmp <> "" Then NumToEng = Tmp & Tri(Count) & NumToEng
If Len(Txt) > 3 Then Txt = Left(Txt, Len(Txt) - 3) Else Txt = ""
Count = Count + 1
Loop
End Function
Function Get000(Num000 As Integer)
Get000 = ""
Text000 = WorksheetFunction.Text(Num000, "000")
If Left(Text000, 1) <> "0" Then Get000 = Get0(Num0:=Val(Left(Text000, 1))) & " Hundred "
Get000 = Get000 & Get00(Num00:=Val(Right(Text000, 2)))
End Function
Function Get00(Num00 As Integer)
Get00 = ""
Text00 = WorksheetFunction.Text(Num00, "00")
If Val(Left(Text00, 1)) = 1 Then
Select Case Num00
Case 10: Get00 = "Ten"
Case 11: Get00 = "Eleven"
Case 12: Get00 = "Twelve"
Case 13: Get00 = "Thirteen"
Case 14: Get00 = "Fourteen"
Case 15: Get00 = "Fifteen"
Case 16: Get00 = "Sixteen"
Case 17: Get00 = "Seventeen"
Case 18: Get00 = "Eighteen"
Case 19: Get00 = "Nineteen"
Case Else
End Select
Else
Select Case Val(Left(Text00, 1))
Case 2: Get00 = "Twenty "
Case 3: Get00 = "Thirty "
Case 4: Get00 = "Forty "
Case 5: Get00 = "Fifty "
Case 6: Get00 = "Sixty "
Case 7: Get00 = "Seventy "
Case 8: Get00 = "Eighty "
Case 9: Get00 = "Ninety "
Case Else
End Select
Get00 = Get00 & Get0(Num0:=Val(Right(Text00, 1)))
End If
End Function
Function Get0(Num0 As Integer)
Select Case Val(Num0)
Case 1: Get0 = "One"
Case 2: Get0 = "Two"
Case 3: Get0 = "Three"
Case 4: Get0 = "Four"
Case 5: Get0 = "Five"
Case 6: Get0 = "Six"
Case 7: Get0 = "Seven"
Case 8: Get0 = "Eight"
Case 9: Get0 = "Nine"
Case Else: Get0 = ""
End Select
End Function
❿ excel中如何将数字转换成英文货币
EXCEL中将人民币更换成美元操作方法如下:
一、选中所要更改在的单元格区域;
二、右击单元格区域,并在下拉菜单中点击“设置单元格格式”(或者使用快捷键Ctrl+1);此时“设置单元格格式”对话框打开;
三、在“设置单元格格式”对话框里选择“数字”按钮;此时“数字”出现下拉框;
四、在“数字”出现下拉框里选择“货币”;
五、在“货币”的对话框里将人民币符号更改为美元符号,并点击保存即可。如下图所示: