메인 컨텐츠로 가기

Excel에서 숫자를 인도 루피로 단어로 변환하는 방법은 무엇입니까?

이 기사에서는 숫자 목록을 Excel에서 인도 루피 또는 영어 달러로 단어로 변환하는 방법을 소개합니다.

VBA 코드를 사용하여 숫자를 인도 루피의 단어로 변환

놀라운 기능으로 숫자를 영어 달러로 단어로 변환


VBA 코드를 사용하여 숫자를 인도 루피의 단어로 변환

다음 VBA 코드는 숫자를 루피 단어로 변환하는 데 도움이 될 수 있습니다. 다음과 같이하십시오.

1. 누르고 ALT + F11 키를 눌러 응용 프로그램 용 Microsoft Visual Basic 창.

2. 딸깍 하는 소리 끼워 넣다 > 모듈을 클릭하고 모듈 창에 다음 코드를 붙여 넣습니다.

VBA 코드 : 숫자를 루피로 된 단어로 변환

Public Function RupeeFormat(SNum As String)
'Updateby Extendoffice
Dim xDPInt As Integer
Dim xArrPlace As Variant
Dim xRStr_Paisas As String
Dim xNumStr As String
Dim xF As Integer
Dim xTemp As String
Dim xStrTemp As String
Dim xRStr As String
Dim xLp As Integer
xArrPlace = Array("", "", " Thousand ", " Lacs ", " Crores ", " Trillion ", "", "", "", "")
On Error Resume Next
If SNum = "" Then
  RupeeFormat = ""
  Exit Function
End If
xNumStr = Trim(str(SNum))
If xNumStr = "" Then
  RupeeFormat = ""
  Exit Function
End If

xRStr = ""
xLp = 0
If (xNumStr > 999999999.99) Then
    RupeeFormat = "Digit excced Maximum limit"
    Exit Function
End If
xDPInt = InStr(xNumStr, ".")
If xDPInt > 0 Then
    If (Len(xNumStr) - xDPInt) = 1 Then
       xRStr_Paisas = RupeeFormat_GetT(Left(Mid(xNumStr, xDPInt + 1) & "0", 2))
    ElseIf (Len(xNumStr) - xDPInt) > 1 Then
       xRStr_Paisas = RupeeFormat_GetT(Left(Mid(xNumStr, xDPInt + 1), 2))
    End If
        xNumStr = Trim(Left(xNumStr, xDPInt - 1))
    End If
    xF = 1
    Do While xNumStr <> ""
        If (xF >= 2) Then
            xTemp = Right(xNumStr, 2)
        Else
            If (Len(xNumStr) = 2) Then
                xTemp = Right(xNumStr, 2)
            ElseIf (Len(xNumStr) = 1) Then
                xTemp = Right(xNumStr, 1)
            Else
                xTemp = Right(xNumStr, 3)
            End If
        End If
        xStrTemp = ""
        If Val(xTemp) > 99 Then
            xStrTemp = RupeeFormat_GetH(Right(xTemp, 3), xLp)
            If Right(Trim(xStrTemp), 3) <> "Lac" Then
            xLp = xLp + 1
            End If
        ElseIf Val(xTemp) <= 99 And Val(xTemp) > 9 Then
            xStrTemp = RupeeFormat_GetT(Right(xTemp, 2))
        ElseIf Val(xTemp) < 10 Then
            xStrTemp = RupeeFormat_GetD(Right(xTemp, 2))
        End If
        If xStrTemp <> "" Then
            xRStr = xStrTemp & xArrPlace(xF) & xRStr
        End If
        If xF = 2 Then
            If Len(xNumStr) = 1 Then
                xNumStr = ""
            Else
                xNumStr = Left(xNumStr, Len(xNumStr) - 2)
            End If
       ElseIf xF = 3 Then
            If Len(xNumStr) >= 3 Then
                 xNumStr = Left(xNumStr, Len(xNumStr) - 2)
            Else
                xNumStr = ""
            End If
        ElseIf xF = 4 Then
          xNumStr = ""
    Else
        If Len(xNumStr) <= 2 Then
        xNumStr = ""
    Else
        xNumStr = Left(xNumStr, Len(xNumStr) - 3)
        End If
    End If
        xF = xF + 1
Loop
    If xRStr = "" Then
       xRStr = "No Rupees"
    Else
       xRStr = " Rupees " & xRStr
    End If
    If xRStr_Paisas <> "" Then
       xRStr_Paisas = " and " & xRStr_Paisas & " Paisas"
    End If
    RupeeFormat = xRStr & xRStr_Paisas & " Only"
    End Function
Function RupeeFormat_GetH(xStrH As String, xLp As Integer)
Dim xRStr As String
If Val(xStrH) < 1 Then
    RupeeFormat_GetH = ""
    Exit Function
Else
   xStrH = Right("000" & xStrH, 3)
   If Mid(xStrH, 1, 1) <> "0" Then
        If (xLp > 0) Then
         xRStr = RupeeFormat_GetD(Mid(xStrH, 1, 1)) & " Lac "
        Else
         xRStr = RupeeFormat_GetD(Mid(xStrH, 1, 1)) & " Hundred "
        End If
    End If
    If Mid(xStrH, 2, 1) <> "0" Then
        xRStr = xRStr & RupeeFormat_GetT(Mid(xStrH, 2))
    Else
        xRStr = xRStr & RupeeFormat_GetD(Mid(xStrH, 3))
    End If
End If
    RupeeFormat_GetH = xRStr
End Function
Function RupeeFormat_GetT(xTStr As String)
    Dim xTArr1 As Variant
    Dim xTArr2 As Variant
    Dim xRStr As String
    xTArr1 = Array("Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen")
    xTArr2 = Array("", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety")
    Result = ""
    If Val(Left(xTStr, 1)) = 1 Then
        xRStr = xTArr1(Val(Mid(xTStr, 2, 1)))
    Else
        If Val(Left(xTStr, 1)) > 0 Then
            xRStr = xTArr2(Val(Left(xTStr, 1)) - 1)
        End If
        xRStr = xRStr & RupeeFormat_GetD(Right(xTStr, 1))
    End If
      RupeeFormat_GetT = xRStr
End Function
Function RupeeFormat_GetD(xDStr As String)
Dim xArr_1() As Variant
    xArr_1 = Array(" One", " Two", " Three", " Four", " Five", " Six", " Seven", " Eight", " Nine", "")
    If Val(xDStr) > 0 Then
        RupeeFormat_GetD = xArr_1(Val(xDStr) - 1)
    Else
        RupeeFormat_GetD = ""
    End If
End Function 

3. 코드를 삽입 한 후 코드 창을 저장하고 닫은 다음 워크 시트로 돌아가 다음 공식을 입력합니다. = RupeeFormat (A2) 빈 셀에 넣은 다음 채우기 핸들을 아래로 끌어이 수식을 다른 셀에 적용합니다. 모든 숫자는 루피로 표시됩니다. 스크린 샷을 참조하십시오.


놀라운 기능으로 숫자를 영어 달러로 단어로 변환

숫자를 영어 달러의 단어로 변환하려면 Excel 용 Kutools숫자를 단어로 기능을 사용하면이 작업을 빠르고 쉽게 해결할 수 있습니다.

팁 :이것을 적용하려면 단어 수 먼저 기능을 다운로드해야합니다. Excel 용 Kutools을 클릭 한 다음 기능을 빠르고 쉽게 적용하십시오.

설치 후 Excel 용 Kutools, 다음과 같이하십시오.

1. 변환하려는 숫자 목록을 선택한 다음 쿠툴 > 내용 > 숫자를 단어로, 스크린 샷 참조 :

2. 에서 숫자를 통화 단어로 대화 상자에서 영어 옵션에서 언어 섹션을 클릭 한 다음 Ok 버튼을 누르면 선택 항목의 숫자가 영어 통화 단어로 변환되었습니다. 스크린 샷 참조 :

Excel 용 Kutools 및 무료 평가판을 지금 다운로드하려면 클릭하십시오!

 


  • 슈퍼 포뮬러 바 (여러 줄의 텍스트와 수식을 쉽게 편집 할 수 있습니다.) 레이아웃 읽기 (많은 수의 셀을 쉽게 읽고 편집합니다.) 필터링 된 범위에 붙여 넣기...
  • 셀 / 행 / 열 병합 및 데이터 보관; 셀 내용 분할; 중복 행과 합계 / 평균 결합... 중복 셀 방지; 범위 비교...
  • 중복 또는 고유 선택 행; 빈 행 선택 (모든 셀이 비어 있음); 슈퍼 찾기 및 퍼지 찾기 많은 통합 문서에서; 무작위 선택 ...
  • 정확한 사본 수식 참조를 변경하지 않고 여러 셀; 참조 자동 생성 여러 시트에; 글 머리 기호 삽입, 확인란 등 ...
  • 즐겨 찾기 및 빠른 수식 삽입, 범위, 차트 및 그림; 셀 암호화 암호로; 메일 링리스트 생성 이메일 보내기 ...
  • 텍스트 추출, 텍스트 추가, 위치 별 제거, 공간 제거; 페이징 부분합을 만들고 인쇄합니다. 셀 내용과 주석 간 변환...
  • 슈퍼 필터 (다른 시트에 필터 구성표 저장 및 적용) 고급 정렬 월 / 주 / 일, 빈도 등 특수 필터 굵은 기울임 꼴로 ...
  • 통합 문서와 워크 시트 결합; 키 열을 기반으로 테이블 병합; 데이터를 여러 시트로 분할; xls, xlsx 및 PDF 일괄 변환...
  • 피벗 테이블 그룹화 기준 주 번호, 요일 등 ... 잠금 해제되고 잠긴 셀 표시 다른 색상으로; 수식 / 이름이있는 셀 강조 표시...
kte 탭 201905
  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
officetab 하단

 

Comments (28)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi
How to eliminate paisa from the code
This comment was minimized by the moderator on the site
thanks alot
This comment was minimized by the moderator on the site
Hi,

Whenever I am saving this file, its showing below message.

Be Careful! Parts of your document may include personal information that can't be removed by the Document Inspector.

Pls suggest if this is safe and if yes, how can we remove this message window permanently.
This comment was minimized by the moderator on the site
Your code is probably the best one I have found so far on the internet. It is really nice and useful. I request to include a small facility if possible. Can you please modify the code, so that "and" will be displayed before the last denomination. For example, the amount 22,44,556 will be converted to "Rupees Twenty Two Lacs Forty Four Thousand Five Hundred Fifty Six Only". It will be best, if it can be converted as "Rupees Twenty Two Lacs Forty Four Thousand Five Hundred and Fifty Six Only". Kindly consider my request.
This comment was minimized by the moderator on the site
The VBA code works effectively. Thanks for sharing these simple and easy to follow tips & steps.
This comment was minimized by the moderator on the site
Can u pls share the code that would spell number for 9000 crore
This comment was minimized by the moderator on the site
Hey, Great Help! Thanks for creating such a wonderful code.

It has saved a lot of time. "God Bless You!!"
This comment was minimized by the moderator on the site
Tried multiple times it's not working. Please help
This comment was minimized by the moderator on the site
Hi Sir, Is it possible to set this for by default for every excel working sheet or not ?
This comment was minimized by the moderator on the site
Hello, Mukesh

Yes, as long as the code is copied into the vba window module, the formula can be applied to the whole workbook.
But when closing the workbook, you should save it as Excel Macro-Enabled Workbook file format.
Please have a try, thank you!
This comment was minimized by the moderator on the site
Thanks a lot it is very Helpful
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations