问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

WPS Office (10.1.0.7106) excel如何吧阿拉伯数字转换成英文

发布网友 发布时间:2022-04-26 21:44

我来回答

1个回答

热心网友 时间:2023-11-06 18:57

有两种方法可以把阿拉伯数字转换成英文。

一、用公式比较复杂

="US DOLLARS "&UPPER(TRIM(IF(VALUE(RIGHT(INT(A1/1000000000),3))=0,"",LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1/1000000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1/1000000000),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1/1000000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&" billion ")&IF(VALUE(RIGHT(INT(A1/1000000),3))=0,"",LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1/1000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1/1000000),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1/1000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&" million ")&IF(VALUE(RIGHT(INT(A1/1000),3))=0,"",LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1/1000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1/1000),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1/1000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&" thousand ")&LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&IF(VALUE(RIGHT(TEXT(A1,"0.00"),2))=0,""," AND CENTS "&IF(VALUE(RIGHT(TEXT(A1,"0.00"),2))<20,LOOKUP(VALUE(RIGHT(TEXT(A1,"0.00"),2)),{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19;"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(LEFT(RIGHT(TEXT(A1,"0.00"),2),1)),{2,3,4,5,6,7,8,9;"twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"})&" "&LOOKUP(VALUE(RIGHT(TEXT(A1,"0.00"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})))&" ONLY"))

二、你可以用VBA代码,ALT+F11——插入模块——粘贴如下代码:

Function SpellNumber(ByVal MyNumber)  

Dim Dollars, Temp

Dim DecimalPlace, Count

ReDim Place(9) As String

Application.Volatile True

Place(2) = " THOUSAND "

Place(3) = " MILLION "

Place(4) = " BILLION "

Place(5) = " TRILLION "

MyNumber = Trim(Str(MyNumber))

DecimalPlace = InStr(MyNumber, ".")

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 = ""

Case "One"

Dollars = "One Dollar"

Case Else

Dollars = "US DOLLARS " & Dollars

End Select

SpellNumber = Dollars

End Function

Function GetHundreds(ByVal MyNumber)

Dim Result As String

If Val(MyNumber) = 0 Then Exit Function

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

If Mid(MyNumber, 1, 1) <> "0" Then

Result = GetDigit(Mid(MyNumber, 1, 1)) & " HUNDRED "

End If

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

Function GetTens(TensText)

Dim Result As String

Result = ""

If Val(Left(TensText, 1)) = 1 Then

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

Select Case Val(Left(TensText, 1))

Case 2: Result = "AND TWENTY "

Case 3: Result = "AND THIRTY "

Case 4: Result = "AND FORTY "

Case 5: Result = "AND FIFTY "

Case 6: Result = "AND SIXTY "

Case 7: Result = "AND SEVENTY "

Case 8: Result = "AND EIGHTY "

Case 9: Result = "AND NINETY "

Case Else

End Select

Result = Result & GetDigit _

(Right(TensText, 1))

End If

GetTens = Result

End Function

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(A1)即可得出结果:

热心网友 时间:2023-11-06 18:57

有两种方法可以把阿拉伯数字转换成英文。

一、用公式比较复杂

="US DOLLARS "&UPPER(TRIM(IF(VALUE(RIGHT(INT(A1/1000000000),3))=0,"",LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1/1000000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1/1000000000),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1/1000000000),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1/1000000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&" billion ")&IF(VALUE(RIGHT(INT(A1/1000000),3))=0,"",LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1/1000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1/1000000),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1/1000000),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1/1000000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&" million ")&IF(VALUE(RIGHT(INT(A1/1000),3))=0,"",LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1/1000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1/1000),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1/1000),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1/1000),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&" thousand ")&LOOKUP(VALUE(LEFT(TEXT(RIGHT(INT(A1),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})&IF(LEFT(TEXT(RIGHT(INT(A1),3),"000"),1)="0"," "," hundred ")&IF(MID(TEXT(RIGHT(INT(A1),3),"000"),2,1)="1",LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1),3),"000"),2,2)),{10,11,12,13,14,15,16,17,18,19;"ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(MID(TEXT(RIGHT(INT(A1),3),"000"),2,1)),{0,1,2,3,4,5,6,7,8,9;"","","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}))&IF(MID(TEXT(RIGHT(INT(A1),3),"000"),2,1)="1","",LOOKUP(VALUE(RIGHT(TEXT(RIGHT(INT(A1),3),"000"),1)),{0,1,2,3,4,5,6,7,8,9;""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"}))&IF(VALUE(RIGHT(TEXT(A1,"0.00"),2))=0,""," AND CENTS "&IF(VALUE(RIGHT(TEXT(A1,"0.00"),2))<20,LOOKUP(VALUE(RIGHT(TEXT(A1,"0.00"),2)),{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19;"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fiifteen","sixteen","seventeen","eighteen","nineteen"}),LOOKUP(VALUE(LEFT(RIGHT(TEXT(A1,"0.00"),2),1)),{2,3,4,5,6,7,8,9;"twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"})&" "&LOOKUP(VALUE(RIGHT(TEXT(A1,"0.00"),1)),{0,1,2,3,4,5,6,7,8,9;"","one","two","three","four","five","six","seven","eight","nine"})))&" ONLY"))

二、你可以用VBA代码,ALT+F11——插入模块——粘贴如下代码:

Function SpellNumber(ByVal MyNumber)  

Dim Dollars, Temp

Dim DecimalPlace, Count

ReDim Place(9) As String

Application.Volatile True

Place(2) = " THOUSAND "

Place(3) = " MILLION "

Place(4) = " BILLION "

Place(5) = " TRILLION "

MyNumber = Trim(Str(MyNumber))

DecimalPlace = InStr(MyNumber, ".")

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 = ""

Case "One"

Dollars = "One Dollar"

Case Else

Dollars = "US DOLLARS " & Dollars

End Select

SpellNumber = Dollars

End Function

Function GetHundreds(ByVal MyNumber)

Dim Result As String

If Val(MyNumber) = 0 Then Exit Function

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

If Mid(MyNumber, 1, 1) <> "0" Then

Result = GetDigit(Mid(MyNumber, 1, 1)) & " HUNDRED "

End If

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

Function GetTens(TensText)

Dim Result As String

Result = ""

If Val(Left(TensText, 1)) = 1 Then

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

Select Case Val(Left(TensText, 1))

Case 2: Result = "AND TWENTY "

Case 3: Result = "AND THIRTY "

Case 4: Result = "AND FORTY "

Case 5: Result = "AND FIFTY "

Case 6: Result = "AND SIXTY "

Case 7: Result = "AND SEVENTY "

Case 8: Result = "AND EIGHTY "

Case 9: Result = "AND NINETY "

Case Else

End Select

Result = Result & GetDigit _

(Right(TensText, 1))

End If

GetTens = Result

End Function

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(A1)即可得出结果:

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
苹果电脑电池充不进电苹果电脑充不进去电是怎么回事 苹果电脑不充电没反应苹果电脑充电指示灯不亮充不了电怎么办 狗狗更加忠诚护家、善解人意,养一只宠物陪伴自己,泰迪能长多大... 描写泰迪狗的外形和特点的句子 国外留学有用吗 花钱出国留学有用吗 !这叫什么号 百万医疗赔付后是否可以续保 前一年理赔过医疗险还能续保吗? 医疗住院险理赔后还能购买吗? 如何在 Excel 中将数值转换为英文单词 怎么把excel小写金额 用公式转换成大写英文 ant地中国发音是什么? ball和ant的发音α一样吗? 可以交易0.01手的外盘,400美元就可以交易黄金的平台有没有?我是新手,想做小手数,谢谢大家推荐! 请问在excel表格中,怎样把钱数由数字变换成英文单词表示,比如说456,直接转换成four hundred fivty-six? apple,ant,angry,name的发音哪个不相同? china canada cat ant,哪个a的发音不一致? “蚂蚁”英文怎么读? 什么是美黄金,有哪些平台可以交易美黄金? ant的音标 如何选择现货黄金交易平台? ant英语正确发音是什么? ant英语的正确发音是什么? 新车红旗h5有自带灭火器吗?在哪里 大家新车有配灭火器吗? 2020年8月份提的5座小轿车,第一次上牌照和审车时,灭火器是否必须要带呢?? 与4S店有关吗?新车怎么不配灭火器, 买新车,带有千斤顶、三角架和灭火器吗? 提新车时,新车里配有灭火器吗? Excel中怎么将一个单元格中的金额数字转换成英文大写金额 苹果绑定微信时候付款需要输入验证码的电话怎么改别的? 抵押贷款和按揭贷款哪个利息高 汕头教育云初中综合素质在哪里??? 我的iPhone7像被人控制那样,会自动点开app,或者打字。这是怎么回事? 社保断交了,之前的缴纳还算数吗? 社保断交后之前交的还算吗 用一个手机号码注册了两个,旧的被新申请的微信替换了。请问怎么找回旧的? 新注册时把原来的替换了如何找到原来的? 社保断交后没有能力续保,以前所交的钱是不是就白交了? 怎么把自己的换了重新设置一个新的? 怎么把自己的换了重新设置一个新的? 社保停交以后还能续交吗,以前交的还算不算? 社保断交后重新缴纳之前的还算吗? 用一个手机号码注册了两个,旧的被新申请的微信替换了。请问怎么找回旧的?手机微信误删除了_百度问一问 以前交了两年社保后来断了还算么?中间空出来的怎么办的 之前买了两年农村养老保中途断交了几年,现在想买社保怎么算呢? 用一个手机号码注册了两个,旧的被新申请的微信替换了。请问怎么找回旧的? 社保断缴之前的还算数吗? 社保断了之后再交能算接着以前的吗?