提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何在Excel中快速将数字转换为英文单词?

如果工作表中有一列数值,现在您需要将它们修改为等效的英语单词或英语货币单词,如下面的屏幕截图所示。 在这里,我将讨论如何快速轻松地将数字更改为英语单词。

使用用户定义的功能将数字转换为英文单词

使用用户定义函数将数字转换为货币字

使用有用的功能将数字转换为货币字


快速轻松地将数字列表拼写成货币单词

Kutools for Excel's 拼出数字 实用程序可以帮助您将所有数字转换为英语或中文的货币单词。 点击下载Kutools for Excel!


使用用户定义的功能将数字转换为英文单词

没有任何功能或公式可以帮助您直接在Excel中解决此任务,但是您可以创建一个用户定义的功能来完成它。 请遵循以下步骤:

1. 按住 ALT + F11 键,然后打开 Microsoft Visual Basic for Applications窗口.

2。 点击 插页 > 模块,并将以下代码粘贴到 模块窗口.

Function NumberstoWords(ByVal MyNumber)
'Update byExtendoffice
Dim xStr As String
Dim xFNum As Integer
Dim xStrPoint
Dim xStrNumber
Dim xPoint As String
Dim xNumber As String
Dim xP() As Variant
Dim xDP
Dim xCnt As Integer
Dim xResult, xT As String
Dim xLen As Integer
On Error Resume Next
xP = Array("", "Thousand ", "Million ", "Billion ", "Trillion ", " ", " ", " ", " ")
xNumber = Trim(Str(MyNumber))
xDP = InStr(xNumber, ".")
xPoint = ""
xStrNumber = ""
If xDP > 0 Then
xPoint = " point "
xStr = Mid(xNumber, xDP + 1)
xStrPoint = Left(xStr, Len(xNumber) - xDP)
For xFNum = 1 To Len(xStrPoint)
xStr = Mid(xStrPoint, xFNum, 1)
xPoint = xPoint & GetDigits(xStr) & " "
Next xFNum
xNumber = Trim(Left(xNumber, xDP - 1))
End If
xCnt = 0
xResult = ""
xT = ""
xLen = 0
xLen = Int(Len(Str(xNumber)) / 3)
If (Len(Str(xNumber)) Mod 3) = 0 Then xLen = xLen - 1
Do While xNumber <> ""
If xLen = xCnt Then
xT = GetHundredsDigits(Right(xNumber, 3), False)
Else
If xCnt = 0 Then
xT = GetHundredsDigits(Right(xNumber, 3), True)
Else
xT = GetHundredsDigits(Right(xNumber, 3), False)
End If
End If
If xT <> "" Then
xResult = xT & xP(xCnt) & xResult
End If
If Len(xNumber) > 3 Then
xNumber = Left(xNumber, Len(xNumber) - 3)
Else
xNumber = ""
End If
xCnt = xCnt + 1
Loop
xResult = xResult & xPoint
NumberstoWords = xResult
End Function
Function GetHundredsDigits(xHDgt, xB As Boolean)
Dim xRStr As String
Dim xStrNum As String
Dim xStr As String
Dim xI As Integer
Dim xBB As Boolean
xStrNum = xHDgt
xRStr = ""
On Error Resume Next
xBB = True
If Val(xStrNum) = 0 Then Exit Function
xStrNum = Right("000" & xStrNum, 3)
xStr = Mid(xStrNum, 1, 1)
If xStr <> "0" Then
xRStr = GetDigits(Mid(xStrNum, 1, 1)) & "Hundred "
Else
If xB Then
xRStr = "and "
xBB = False
Else
xRStr = " "
xBB = False
End If
End If
If Mid(xStrNum, 2, 2) <> "00" Then
xRStr = xRStr & GetTenDigits(Mid(xStrNum, 2, 2), xBB)
End If
GetHundredsDigits = xRStr
End Function
Function GetTenDigits(xTDgt, xB As Boolean)
Dim xStr As String
Dim xI As Integer
Dim xArr_1() As Variant
Dim xArr_2() As Variant
Dim xT As Boolean
xArr_1 = Array("Ten ", "Eleven ", "Twelve ", "Thirteen ", "Fourteen ", "Fifteen ", "Sixteen ", "Seventeen ", "Eighteen ", "Nineteen ")
xArr_2 = Array("", "", "Twenty ", "Thirty ", "Forty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
xStr = ""
xT = True
On Error Resume Next
If Val(Left(xTDgt, 1)) = 1 Then
xI = Val(Right(xTDgt, 1))
If xB Then xStr = "and "
xStr = xStr & xArr_1(xI)
Else
xI = Val(Left(xTDgt, 1))
If Val(Left(xTDgt, 1)) > 1 Then
If xB Then xStr = "and "
xStr = xStr & xArr_2(Val(Left(xTDgt, 1)))
xT = False
End If
If xStr = "" Then
If xB Then
xStr = "and "
End If
End If
If Right(xTDgt, 1) <> "0" Then
xStr = xStr & GetDigits(Right(xTDgt, 1))
End If
End If
GetTenDigits = xStr
End Function
Function GetDigits(xDgt)
Dim xStr As String
Dim xArr_1() As Variant
xArr_1 = Array("Zero ", "One ", "Two ", "Three ", "Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine ")
xStr = ""
On Error Resume Next
xStr = xArr_1(Val(xDgt))
GetDigits = xStr
End Function

3。 保存并关闭此代码并返回工作表,在空白单元格中输入此公式 = NumberstoWords(A2)( A2 是要将数字转换为英文单词的单元格,请参见屏幕截图:

4。 然后按 输入 键,然后选择单元格C2,然后将填充句柄拖到要包含此公式的范围。 所有的数值已经被转换成相应的英文单词。

注意:此代码仅适用于整数,但不适用于十进制数。


使用用户定义函数将数字转换为货币字

如果要将数字转换为英语货币字,则应使用以下VBA代码。

1. 按住 ALT + F11 键,然后打开 Microsoft Visual Basic for Applications窗口.

2。 点击 插页 > 模块,并将以下代码粘贴到 模块窗口.

Function SpellNumberToEnglish(ByVal pNumber)
'Update byExtendoffice
Dim Dollars, Cents
arr = Array("", "", " Thousand ", " Million ", " Billion ", " Trillion ")
pNumber = Trim(Str(pNumber))
xDecimal = InStr(pNumber, ".")
If xDecimal > 0 Then
    Cents = GetTens(Left(Mid(pNumber, xDecimal + 1) & "00", 2))
    pNumber = Trim(Left(pNumber, xDecimal - 1))
End If
xIndex = 1
Do While pNumber <> ""
    xHundred = ""
    xValue = Right(pNumber, 3)
    If Val(xValue) <> 0 Then
        xValue = Right("000" & xValue, 3)
        If Mid(xValue, 1, 1) <> "0" Then
            xHundred = GetDigit(Mid(xValue, 1, 1)) & " Hundred "
        End If
        If Mid(xValue, 2, 1) <> "0" Then
            xHundred = xHundred & GetTens(Mid(xValue, 2))
        Else
            xHundred = xHundred & GetDigit(Mid(xValue, 3))
        End If
    End If
    If xHundred <> "" Then
        Dollars = xHundred & arr(xIndex) & Dollars
    End If
    If Len(pNumber) > 3 Then
        pNumber = Left(pNumber, Len(pNumber) - 3)
    Else
        pNumber = ""
    End If
    xIndex = xIndex + 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
SpellNumberToEnglish = Dollars & Cents
End Function
Function GetTens(pTens)
Dim Result As String
Result = ""
If Val(Left(pTens, 1)) = 1 Then
    Select Case Val(pTens)
        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(pTens, 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(pTens, 1))
End If
GetTens = Result
End Function
Function GetDigit(pDigit)
Select Case Val(pDigit)
    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

3。 保存此代码并返回工作表,在空白单元格中输入此公式 = SpellNumberToEnglish(A2)( A2 是要将数字转换为英文货币字的单元格,然后将填充柄向下拖动到要应用此公式的单元格,所有数字都拼写成英文货币字,请参见屏幕截图:


使用有用的功能将数字转换为货币字

以上代码对于Excel初学者来说有点麻烦,在这里,我将介绍一个有用的功能, Kutools for Excel's 拼出数字使用此实用程序,您可以快速将数字拼写成英文当前单词。

提示:申请这个 拼出数字 功能,首先,你应该下载 Kutools for Excel,然后快速轻松地应用该功能。

安装后 Kutools for Excel,请这样做:

1。 选择要转换的数字列表,然后单击 Kutools > 内容 > 拼出数字,看截图:

2。 在 拼出数字 拨号盒,检查 英语 选项从 语言 列表框,然后单击 Ok 按钮,您会看到所有数字都拼写成英文货币字:

点击下载Kutools for Excel和免费试用版吧!


Kutools for Excel - 最佳办公生产力工具提高80%的生产力

  • 重用: 快速插入 复杂的公式,图表 以及你以前用过的任何东西; 加密单元格 密码; 创建邮件列表 并发送电子邮件...
  • 超级方程式酒吧 (轻松编辑多行文字和公式); 阅读布局 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不丢失数据; 分裂细胞含量; 组合重复的行/列...防止重复的细胞; 比较范围...
  • 选择复制或唯一 行; 选择空行 (所有细胞都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择......
  • 精确复制 多个单元格而不更改公式参考; 自动创建参考 多张表; 插入项目符号,复选框等等......
  • 提取文本,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级过滤器 (将过滤方案保存并应用到其他工作表); 高级排序 按月/周/日,频率等; 特殊过滤器 用粗体,斜体......
  • 结合工作簿和工作表; 根据键列合并表; 将数据拆分为多个表格; 批量转换xls,xlsx和PDF...
  • 超过300强大的功能。 支持Office / Excel 2007-2019和365。 支持所有语言。 在您的企业或组织中轻松部署。 全功能60天免费试用。
kte tab 201905

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    MD HASHMATH · 22 days ago
    I JUST WANT TO TRANSLATE THE DIGIT INTO TEXT. FROM 1 TO 100 LIKE 42 = FORTY TWO, 99= NINETY NINE..............
    • To post as a guest, your comment is unpublished.
      skyyang · 22 days ago
      Hello, MD,
      The code in this article can help to solve your problem, please try, hope it can help you! Thank you!
  • To post as a guest, your comment is unpublished.
    Ds Bhandari · 1 months ago
    Dear Sir,

    I do this the success but Number to English convert than Not Actualy work get the Last workd is all Number cents
    please what to do for removed cents word
  • To post as a guest, your comment is unpublished.
    s.s · 3 months ago
    desimal number not show in english from numberstowords formula
    • To post as a guest, your comment is unpublished.
      skyyang · 23 days ago
      Hello,
      The code in this article has been updated, now it can be applied to decimal numbers, please try, hope it can help you!
  • To post as a guest, your comment is unpublished.
    Rajesh Bambhaniya · 4 months ago
    not work Properly...
  • To post as a guest, your comment is unpublished.
    Alexa · 4 months ago
    This is helpful. Thank you so much :)
  • To post as a guest, your comment is unpublished.
    SUREN · 4 months ago
    Dear sir,
    it is not converting in to INR
  • To post as a guest, your comment is unpublished.
    Arsen · 4 months ago
    It is great!!!
    Do you know how to write a code for numbers in another language? In English it works pretty well.
  • To post as a guest, your comment is unpublished.
    ekta · 4 months ago
    unable to save the module part ..some one kindly assist
  • To post as a guest, your comment is unpublished.
    Abu Arwa · 6 months ago
    Thank you so very much it solve my problem
  • To post as a guest, your comment is unpublished.
    Adnan · 7 months ago
    how can i get 0 = - or zero
  • To post as a guest, your comment is unpublished.
    Shreepad S M Gandhi · 8 months ago
    I have an own set of formula combinations to convert numbers from 0 (zero) to 9999999 (Ninety Nine Lakhs Ninety Nine Thousand Nine Hundred Ninety Nine).

    (This number is the upper limit for my method. It will return an error for any number out of this range). Secondly, as it is Excel formula based method, only one cell can be converted at a time.
    Send your request to shreepadg at the rate gmail dot com
  • To post as a guest, your comment is unpublished.
    Apatel · 9 months ago
    Thank you extendOfficea
  • To post as a guest, your comment is unpublished.
    Rayees Ahmed · 9 months ago
    there is a bug when my amount is "618475" it says "Six Hundred Eighteen Thousand Four Hundred Seventy Five" instead of "six lac eighteen thousand four hundred seventy five".
  • To post as a guest, your comment is unpublished.
    Keycee · 11 months ago
    Thanks


    Its working! :)
  • To post as a guest, your comment is unpublished.
    Thomas VJ · 11 months ago
    FINE. But sorry to say that this formula is NOT working permanently ... I closed the workbook for Lunch break. After Lunch I opened the file but the formula was not working. showing error like #NAME?. Kindly intimate solutions please.
  • To post as a guest, your comment is unpublished.
    Absheer Ali · 11 months ago
    Thanks a lot
  • To post as a guest, your comment is unpublished.
    Siva · 11 months ago
    What about lakhs and crores
  • To post as a guest, your comment is unpublished.
    Ms. GC · 11 months ago
    I'm not getting the cents spell out... my amount is 123.50 and got "one hundred twenty three"... copied all the formula, please help
  • To post as a guest, your comment is unpublished.
    jjkok · 1 years ago
    For example we convert 2500 into word "Two Thousand Five Hundred", I want to translate it like " Two Thousand Five Hundred & Cents Fifty Only" so could you please help
  • To post as a guest, your comment is unpublished.
    Raj · 1 years ago
    lakh crore not in the formula. Kindly help me.
  • To post as a guest, your comment is unpublished.
    Rajkumar singh · 1 years ago
    For example we convert 2500 into word "Two Thousand Five Hundred", I want to translate it like " Two Thousand Five Hundred Only" so missing in formula is "Only"
    Please help
    • To post as a guest, your comment is unpublished.
      Shubham · 1 years ago
      use =CONCATENATE(NumberstoWords(A1)," Only")
      • To post as a guest, your comment is unpublished.
        SAIMA SYED · 1 years ago
        Really thanks dear, your formula was perfect, good, Allah Bless you.
        Regards.
  • To post as a guest, your comment is unpublished.
    MAHADEVAPPA BADIGER · 1 years ago
    thanks for lot for u are code
  • To post as a guest, your comment is unpublished.
    vsk · 1 years ago
    this code is not working permenatly ...if we close and open the sheet its not working
    • To post as a guest, your comment is unpublished.
      RAMPRASAD · 1 years ago
      Save the file as "Macro Enabled Work Book" and enable Macros when you open it
  • To post as a guest, your comment is unpublished.
    Martin Gich · 1 years ago
    ADD THE WORD AND BETWEEN WORDS. One Hundred and Forty Thousand, Five Hundred and Twenty Six instead of One Hundred Forty Thousand Five Hundred Twenty Six. The sentence may not be understood well as its not proper english.
  • To post as a guest, your comment is unpublished.
    Jaydip Trivedi · 1 years ago
    Above mentioned formula in module is repeated and copied from Microsoft Website..

    Please see original link and follow Microsoft Update..

    https://support.microsoft.com/en-in/help/213360/how-to-convert-a-numeric-value-into-english-words-in-excel
    • To post as a guest, your comment is unpublished.
      Monika Borse · 22 days ago
      dear this code is showing syntax error in this line
      Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) &_"00", 2))

      can you help me ..??Reply me AS soon As possible
  • To post as a guest, your comment is unpublished.
    sjmalik · 1 years ago
    For example we convert 4000 into word "Four Thousand", I want to translate it like " Saudi Riyals Four Thousand Only" so missing in formula is "Saudi Riyals & Only"
    Please help
  • To post as a guest, your comment is unpublished.
    Sjmalik · 1 years ago
    Thanks for your kind support for creating formula. Can you please tell us if we need to add the name of currency..like Saudi Riyals or British Pounds.
  • To post as a guest, your comment is unpublished.
    Leurie · 1 years ago
    how about if the number's has a (.) like 150.75 or 3.35? please help Thanks...
  • To post as a guest, your comment is unpublished.
    Pinkesh Panchal · 1 years ago
    Sir how can i convert numerical to words with last word "Only" ?
  • To post as a guest, your comment is unpublished.
    tushar jain · 1 years ago
    this code is not working
  • To post as a guest, your comment is unpublished.
    Jayaraj Mani · 2 years ago
    Hi.. Good morning[s]Hi.. Good morning.. It is nice to meet you. [/s]