在 Excel 中將數字轉換為印度盧比及其他貨幣的文字形式(2025 版)
以下是將數字轉換為印度盧比或任何其他貨幣文字形式的方法。
在處理發票、報價單、稅務表單、支票或付款憑證等財務文件時,通常需要以數字和文字形式表示貨幣值。這不僅增加了專業性,還能防止詐騙或誤解。
範例
雖然 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 視窗)。

步驟 2:前往 插入 > 模組。

步驟 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

步驟 4:保存並返回 Excel。
步驟 5:選擇一個單元格並使用以下公式:
按下 Enter 鍵

💡 提示:此方法支持小數(派薩)並且可以離線使用。
使用 VBA 的限制
- 需要將工作簿保存為啟用宏的文件 (.xlsm)。
- 某些環境中的安全設置可能會阻止宏運行。
將數字轉換為其他貨幣的文字形式(USD、EUR 等)
要為其他貨幣(如「美元」或「歐元」)自訂輸出,您可以調整 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 公式:

其他貨幣的範例 VBA 公式:
=NumberToWordsCustom(A2, "Euros", "Cents")
=NumberToWordsCustom(A2, "Pounds", "Pence")
該程式碼非常靈活——只需傳遞所需的貨幣及其子單位即可。
將工作簿另存為啟用宏的文件
如果您使用 VBA,則務必在保存工作簿時啟用宏。否則,關閉文件後您的程式碼將會丟失。
步驟 1:前往 文件 > 另存為

步驟 2:選擇保存位置並選擇文件類型:啟用宏的 Excel 工作簿 (*.xlsm)。

步驟 3:點擊 保存。
✅ 您的自訂函數如 =ConvertToRupees(A2) 現在將持久存在,並可隨時重複使用。
使用 LAMBDA 函數將數字轉換為印度盧比的文字形式(僅限 Microsoft 365)
對於 Excel 365 使用者,您可以使用 LAMBDA,這是一項新的 Excel 功能,讓您定義自訂公式——無需 VBA。
🪄 什麼是 LAMBDA?
LAMBDA 是 Excel 中的一項功能,讓您能夠使用公式創建自己的自訂函數——就像內建函數如 SUM 或 IF 一樣,但不需要任何代碼或宏。它非常適合簡化重複邏輯,讓您的試算表更加簡潔且易於維護。
步驟 1:前往名稱管理器,點擊 公式 > 名稱管理器。

步驟 2:創建一個新名稱。
點擊 新建 按鈕。
輸入一個名稱。
範例:RupeeToWords
步驟 3:將此 LAMBDA 公式粘貼到 引用位置 欄位中:
=LAMBDA(n, LET( units, {"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"}, teens, {"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"}, tens, {"","","Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety"}, 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) & " Hundred" & IF(MOD(x,100)>0, " " & ConvertTwo(MOD(x,100)), "") ) ) ), words, IF(num=0, "Zero", TEXTJOIN(" ", TRUE, IF(INT(num/10000000)>0, ConvertTwo(INT(num/10000000)) & " Crore", ""), IF(MOD(INT(num/100000),100)>0, ConvertTwo(INT(MOD(num,10000000)/100000)) & " Lakh", ""), IF(MOD(INT(num/1000),100)>0, ConvertTwo(INT(MOD(num,100000)/1000)) & " Thousand", ""), IF(MOD(INT(num/100),10)>0, INDEX(units, INT(MOD(num,1000)/100)+1) & " Hundred", ""), IF(MOD(num,100)>0, ConvertTwo(MOD(num,100)), "") ) ), result, "Rupees " & words & IF(paise>0, " and " & ConvertTwo(paise) & " Paise", "") & " Only", result ))點擊 OK 保存新名稱。

步驟 3:關閉名稱管理器並返回 Excel。
步驟 4:在任意單元格中使用該公式如下:
按下 Enter 鍵。

👀 完整的 LAMBDA 函數程式碼涵蓋了克若、拉克、千和小數部分。
將數字轉換為美元、歐元及其他 30 多種貨幣的文字形式(適用於所有 Microsoft 版本)
為了最高效且專業的解決方案,請使用 Kutools for Excel 的 Numbers to Words 功能。這個強大的工具支持:
🌍 超過 30 種貨幣,包括:
- 美元 (USD)
- 歐元 (EUR)
- 人民幣 (CNY)
- 英鎊 (GBP)
- 等等。
步驟 1:選擇要轉換的單元格。

步驟 2:前往 Kutools > 文字 > Numbers to Words

步驟 3:選擇您的目標貨幣並點擊 OK。

數字將被轉換為指定的貨幣文字形式。

😁 提示:如果您想直接將數字轉換為文字,勾選 不轉換為貨幣 選項,結果將顯示如下:

何時使用每種方法
如果您需要靈活、可編程的解決方案,並且熟悉宏,則使用 VBA。
- 如果您使用的是 Excel 365,並且只是偶爾需要轉換印度盧比值,則使用 LAMBDA。它是一種輕量級、可共享的解決方案,不需要宏或外部工具——非常適合簡單或個人任務。
- 如果您想要最簡單、最快捷且最多功能的解決方案——無需編碼,則使用 Kutools for Excel。Kutools 在以下情況下特別有用:
- 您處理多種貨幣。
- 需要批量轉換或處理大型數據集。
- 想要一款無需宏、具備專業性能並且支持 30 多種貨幣選項和 AI 功能的工具。
最佳 Office 辦公效率工具
🤖 | Kutools AI Aide:徹底革新數據分析,基於智能執行|生成程式碼|創建自訂公式|分析數據並生成圖表|調用 Kutools Functions… |
熱門功能:查找、選取項目的背景色或標記重複值 | 刪除空行 | 合併列或單元格且不丟失資料 | 四捨五入... | |
高級 LOOKUP:多條件查找|多值查找|多表查找|模糊查找... | |
高級下拉列表:快速創建下拉列表 | 關聯下拉列表 | 多選下拉列表 ... | |
列管理器: 添加指定數量的列 | 移動列 | 切換隱藏列的可見狀態 | 區域與列比較 ... | |
精選功能:網格聚焦 | 設計檢視 | 增強編輯欄 | 工作簿及工作表管理器 | 資源庫 (自動文本) | 日期提取器 | 合併資料 | 加密/解密儲存格 | 按清單發送電子郵件 | 超級篩選 | 特殊篩選(篩選粗體/傾斜/刪除線 ...)... | |
前15 大工具集:12 款文本工具(添加文本,刪除特定字符,...)|50+ 種圖表 類型(甘特圖,...)|40+ 實用 公式(基於生日計算年齡,...)|19 款插入工具(插入QR码,按路徑插入圖片,...)|12 款轉換工具(金額轉大寫,匯率轉換,...)|7 款合併和分割工具(高級合併行,分割儲存格,...)| ...以及更多 |
利用 Kutools for Excel 大幅提升你的 Excel 技能,感受前所未有的高效體驗。 Kutools for Excel 提供超過300 項高級功能,助你提升效率並保存時間。 點此查看你最需要的功能...
Office Tab 為 Office 帶來標籤式介面,讓你的工作更加輕鬆
- 啟用 Word、Excel、PowerPoint 的標籤式編輯和閱讀功能
- 在同一個視窗的標籤中打開和創建多個文件,而不是在新窗口中分開開啟。
- 可提升你50% 的工作效率,每天為你大量減少滑鼠點擊次數!