跳至主要内容

Kutools for Office — 一套工具,五种功能。事半功倍。

在Excel中将数字转换为印度卢比及其他货币的文字形式(2025版)

Author Xiaoyang Last modified

以下是将数字转换为印度卢比或其他任何货币的文字形式的方法。

在处理发票、报价单、税务表格、支票或付款凭证等财务文件时,通常需要以数字和文字形式表示货币值。这种方式不仅显得专业,还能防止欺诈或误解。

示例

12,350.50 → 卢比一万二千三百五十及五十派萨整

虽然Microsoft Excel没有内置功能来将数字转换为文字,但可以通过多种有效方法实现——例如使用VBA、LAMBDA函数,或者全能型的Kutools for Excel插件。

使用VBA将数字转换为印度卢比文字(适用于所有Microsoft版本)

使用LAMBDA函数将数字转换为印度卢比文字(仅限Microsoft 365)

将数字转换为美元、欧元及其他30多种货币文字(适用于所有Microsoft版本)

何时使用每种方法


使用VBA将数字转换为印度卢比文字(适用于所有Microsoft版本)

对于任何版本的Excel用户来说,VBA(Visual Basic for Applications)提供了一种可自定义的方法,可以使用印度数字系统(如千、拉克、克若尔)将数字金额转换为文字形式。

步骤1:按 Alt + F11 打开VBA编辑器(Microsoft Visual Basic for Applications窗口)。

vba-editor

步骤2:转到 插入 > 模块

select-module

步骤3:将VBA代码粘贴到模块中。

将数字转换为印度卢比文字

Function ConvertToRupees(ByVal MyNumber)
'UpdatebyExtendoffice
    Dim Units As String, SubUnits As String, TempStr As String
    Dim DecimalPlace As Integer, Count As Integer
    Dim Place(9) As String
    Place(2) = " Thousand "
    Place(3) = " Lakh "
    Place(4) = " Crore "
    
    MyNumber = Trim(Str(MyNumber))
    DecimalPlace = InStr(MyNumber, ".")
    
    If DecimalPlace > 0 Then
        SubUnits = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
        MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
    End If
    
    Count = 1
    Do While MyNumber <> ""
        TempStr = GetHundreds(Right(MyNumber, 3))
        If TempStr <> "" Then Units = TempStr & Place(Count) & Units
        If Len(MyNumber) > 3 Then
            MyNumber = Left(MyNumber, Len(MyNumber) - 3)
        Else
            MyNumber = ""
        End If
        Count = Count + 1
    Loop
    
    ConvertToRupees = "Rupees " & Application.WorksheetFunction.Trim(Units)
    If SubUnits <> "" Then
        ConvertToRupees = ConvertToRupees & " and " & SubUnits & " Paise"
    End If
    ConvertToRupees = ConvertToRupees & " Only"
End Function

Private 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

Private Function GetTens(TensText)
    Dim Result As String
    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"
        End Select
    Else
        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 "
        End Select
        Result = Result & GetDigit(Right(TensText, 1))
    End If
    GetTens = Result
End Function

Private 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
paste-code

步骤4:保存并返回Excel。

步骤5:选择一个单元格并使用如下公式:

=ConvertToRupees(A2)

Enter

use-formula

💡 提示:此方法支持小数(派萨),并且可以离线使用。

使用VBA的局限性

  • 需要将工作簿保存为启用宏的文件(.xlsm)。
  • 在某些环境中,宏可能会被安全设置阻止。

将数字转换为其他货币文字(美元、欧元等)

要为其他货币(如“美元”或“欧元”)自定义输出,可以在VBA函数中调整字符串值。以下是一个简化且更灵活的函数版本。

灵活的VBA代码模板(自定义货币)

'UpdatebyExtendoffice
Public Function NumberToWordsCustom(ByVal num As Double, Optional ByVal currency2 As String, Optional ByVal subCurrency As String) As String
    Dim result As String
    Dim dollars As Long
    Dim cents As Long

    dollars = Int(num)
    cents = Round((num - dollars) * 100)
  
    If Len(currency2) = 0 Then currency2 = "Dollars"
    If Len(subCurrency) = 0 Then subCurrency = "Cents"
    result = currency2 & " " & SpellNumber_English(dollars)

    If cents > 0 Then
        result = result & " and " & SpellNumber_English(cents) & " " & subCurrency
    End If

    NumberToWordsCustom = result & " Only"
End Function

Private Function SpellNumber_English(ByVal MyNumber As Long) As String
    Dim Units As Variant, Tens As Variant, Teens As Variant
    Dim Place() As String
    Dim TempStr As String
    Dim Count As Integer
    Dim t As String
    Dim StrNumber As String
    Dim n As Integer

    Place = Split(" Thousand Million Billion", " ")
    Units = Array("", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine")
    Tens = Array("", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety")
    Teens = Array("Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen")

    StrNumber = Trim(Str(MyNumber))
    Count = 0

    Do While StrNumber <> ""
        n = Val(Right(StrNumber, 3))
        If n <> 0 Then
            t = ConvertHundreds(n, Units, Tens, Teens)
            If Count > 0 Then t = t & " " & Place(Count - 1)
            TempStr = t & " " & TempStr
        End If
        If Len(StrNumber) > 3 Then
            StrNumber = Left(StrNumber, Len(StrNumber) - 3)
        Else
            StrNumber = ""
        End If
        Count = Count + 1
    Loop

    SpellNumber_English = Trim(TempStr)
End Function

Private Function ConvertHundreds(ByVal n As Integer, Units As Variant, Tens As Variant, Teens As Variant) As String
    Dim result As String
    If n >= 100 Then
        result = Units(Int(n / 100)) & " Hundred "
        n = n Mod 100
    End If
    If n >= 20 Then
        result = result & Tens(Int(n / 10)) & " "
        n = n Mod 10
    ElseIf n >= 10 Then
        result = result & Teens(n - 10) & " "
        n = 0
    End If
    If n > 0 Then
        result = result & Units(n)
    End If
    ConvertHundreds = Trim(result)
End Function

示例VBA公式:

=NumberToWordsCustom(A2, "美元", "美分")
vba-formula-to-other-currency

其他货币的示例VBA公式:

=NumberToWordsCustom(A2, "欧元", "欧分")

=NumberToWordsCustom(A2, "英镑", "便士")

该代码非常灵活——只需传入所需的货币及其细分单位即可。


将工作簿保存为启用宏的文件

如果使用VBA,则必须保存启用了宏的工作簿。否则,关闭文件后代码将会丢失。

步骤1:转到 文件 > 另存为

use-save-as

步骤2:选择位置并将文件类型设置为:启用宏的Excel工作簿 (*.xlsm)

use-save-as-macro-enabled

步骤3:点击 保存

✅ 自定义函数(如 =ConvertToRupees(A2))现在可以持久保存,并随时重复使用。


使用LAMBDA函数将数字转换为印度卢比文字(仅限Microsoft 365)

对于Excel 365用户,您可以使用LAMBDA这一新功能定义自定义公式,无需使用VBA。

🪄 LAMBDA是什么?

LAMBDA是Excel的一项功能,允许您通过公式创建自己的自定义函数——就像内置函数(如SUM或IF)一样,但无需编写代码或使用宏。它非常适合简化重复逻辑,使您的电子表格更加整洁且易于维护。

步骤1:转到名称管理器,点击 公式 > 名称管理器

select-name-manager

步骤2:创建一个新的名称。

  • 点击 新建 按钮。

    create-new-name
  • 输入名称

    示例:RupeeToWords

    create-name
  • 步骤3:将以下LAMBDA公式粘贴到 引用位置 字段:

    =LAMBDA(n, LET( units, {"","一","二","三","四","五","六","七","八","九"}, teens, {"十","十一","十二","十三","十四","十五","十六","十七","十八","十九"}, tens, {"","","二十","三十","四十","五十","六十","七十","八十","九十"}, num, INT(n), paise, ROUND((n - INT(n)) * 100, 0), ConvertTwo, LAMBDA(x, IF(x<10, INDEX(units, x+1), IF(x<20, INDEX(teens, x-9), INDEX(tens, INT(x/10)+1) & IF(MOD(x,10)>0, " " & INDEX(units, MOD(x,10)+1), "") ) ) ), ConvertThree, LAMBDA(x, IF(x=0, "", IF(x<100, ConvertTwo(x), INDEX(units, INT(x/100)+1) & "百" & IF(MOD(x,100)>0, " " & ConvertTwo(MOD(x,100)), "") ) ) ), words, IF(num=0, "零", TEXTJOIN(" ", TRUE, IF(INT(num/10000000)>0, ConvertTwo(INT(num/10000000)) & "千万", ""), IF(MOD(INT(num/100000),100)>0, ConvertTwo(INT(MOD(num,10000000)/100000)) & "十万", ""), IF(MOD(INT(num/1000),100)>0, ConvertTwo(INT(MOD(num,100000)/1000)) & "千", ""), IF(MOD(INT(num/100),10)>0, INDEX(units, INT(MOD(num,1000)/100)+1) & "百", ""), IF(MOD(num,100)>0, ConvertTwo(MOD(num,100)), "") ) ), result, "卢比 " & words & IF(paise>0, " 和 " & ConvertTwo(paise) & "派萨", "") & " 整", result ))
  • paste-lambda-function
  • 点击 确定 保存新名称。

步骤3:关闭名称管理器并返回Excel。

步骤4:在任意单元格中使用如下公式:

=RupeeToWords(A2)

Enter 键。

use-lambda-formula

👀 完整的LAMBDA函数代码支持千万、十万、千以及小数部分。


将数字转换为美元、欧元及其他30多种货币文字(适用于所有Microsoft版本)

为了获得最高效且专业的解决方案,请使用 Kutools for Excel 的 数字转文字 功能。这个强大的工具支持:

🌍 超过30种货币,包括:

  • 美元 (USD)
  • 欧元 (EUR)
  • 人民币 (CNY)
  • 英镑 (GBP)
  • 等等。
下载

步骤1:选择要转换的单元格。

select-cells

步骤2:转到 Kutools > 文本 > 数字转文字

select-numbers-to-words

步骤3:选择目标货币并点击 确定。

select-currency-in-dialog

数字将被转换为目标货币的文字形式。

kutools-convert-result

😁 提示:如果您想直接将数字转换为文字,请勾选 不转换为货币 选项,结果将显示如下:

convert-to-words

何时使用每种方法

  • 如果您需要灵活的可编程解决方案,并且熟悉宏,请使用VBA。

  • 如果您使用的是Excel 365,并且只是偶尔需要将印度卢比数值转换为文字形式,那么请使用LAMBDA。这是一种轻量级、可共享的解决方案,无需宏或外部工具——非常适合简单或个人任务。
  • 如果您想要最简单、最快捷且多功能的解决方案,请使用 Kutools for Excel——无需编码。当您符合以下情况时,Kutools 尤其有用:
    • 处理多种货币。
    • 需要批量或大规模数据集的转换。
    • 想要一个无宏、即用型的专业工具,支持30多种货币选项和AI驱动性能。

最佳Office办公效率工具

🤖 Kutools AI 助手:以智能执行为基础,彻底革新数据分析 |代码生成 |自定义公式创建|数据分析与图表生成 |调用Kutools函数……
热门功能:查找、选中项的背景色或标记重复项 | 删除空行 | 合并列或单元格且不丢失数据 | 四舍五入……
高级LOOKUP多条件VLookup|多值VLookup|多表查找|模糊查找……
高级下拉列表快速创建下拉列表 |依赖下拉列表 | 多选下拉列表……
列管理器添加指定数量的列 | 移动列 | 切换隐藏列的可见状态 | 比较区域与列……
特色功能网格聚焦 |设计视图 | 增强编辑栏 | 工作簿及工作表管理器 | 资源库(自动文本) | 日期提取 | 合并数据 | 加密/解密单元格 | 按名单发送电子邮件 | 超级筛选 | 特殊筛选(筛选粗体/倾斜/删除线等)……
15大工具集12项 文本工具添加文本删除特定字符等)|50+种 图表 类型甘特图等)|40+实用 公式基于生日计算年龄等)|19项 插入工具插入二维码从路径插入图片等)|12项 转换工具小写金额转大写汇率转换等)|7项 合并与分割工具高级合并行分割单元格等)| ……
Kutools支持多种语言——可选择英语、西班牙语、德语、法语、中文等40多种语言!

通过Kutools for Excel提升您的Excel技能,体验前所未有的高效办公。 Kutools for Excel提供300多项高级功能,助您提升效率并节省时间。 点击此处获取您最需要的功能……


Office Tab为Office带来多标签界面,让您的工作更加轻松

  • 支持在Word、Excel、PowerPoint中进行多标签编辑与阅读
  • 在同一个窗口的新标签页中打开和创建多个文档,而不是分多个窗口。
  • 可提升50%的工作效率,每天为您减少数百次鼠标点击!

所有Kutools加载项,一键安装

Kutools for Office套件包含Excel、Word、Outlook和PowerPoint的插件,以及Office Tab Pro,非常适合跨Office应用团队使用。

Excel Word Outlook Tabs PowerPoint
  • 全能套装——Excel、Word、Outlook和PowerPoint插件+Office Tab Pro
  • 单一安装包、单一授权——数分钟即可完成设置(支持MSI)
  • 协同更高效——提升Office应用间的整体工作效率
  • 30天全功能试用——无需注册,无需信用卡
  • 超高性价比——比单独购买更实惠