انتقل إلى المحتوى الرئيسي

كيفية تحويل العملات إلى نص كلمات في إكسيل؟

بالنسبة لغير الناطقين بها الذين يستخدمون اللغة الإنجليزية كلغة ثانية ، يصعب أحيانًا تغيير رقم العملة مباشرة إلى الكلمات الإنجليزية عندما يكون الرقم طويلًا جدًا. في هذه المقالة ، ستتعلم كيفية تحويل العملات بسهولة إلى نص كلمات في Excel.

تحويل العملة إلى كلمات برمز VBA
تحويل العملات إلى كلمات مع كوتولس ل إكسيل


تحويل العملة إلى كلمات برمز VBA

باستخدام رمز VBA أدناه ، يمكنك تحويل رقم العملة إلى كلمات إنجليزية.

1. صحافة قديم + F11 لفتح ميكروسوفت فيسوال باسيك للتطبيقات صندوق المحادثة.

2. في ال ميكروسوفت فيسوال باسيك للتطبيقات مربع الحوار، انقر فوق إدراج > وحدة. ثم انسخ الكود أدناه والصقه في نافذة الكود.

كود فبا: تحويل رقم العملة إلى الكلمات الإنجليزية

Function NumberstoWords(ByVal pNumber)
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
NumberstoWords = 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. صحافة قديم + Q مفاتيح في نفس الوقت لإغلاق ميكروسوفت فيسوال باسيك للتطبيقات صندوق المحادثة.

4. حدد خلية فارغة (B1) مجاورة للخلية التي تريد تحويلها إلى كلمات ، أدخل الصيغة = NumberstoWords (A1)، ثم اضغط على أدخل الرئيسية.

ملاحظات: A1 هي الخلية التي تحتوي على رقم العملة. يمكنك تغييره كما تريد.

5. حدد الخلية B1 ، واسحب مقبض التعبئة لأسفل للحصول على جميع الكلمات الإنجليزية لأرقام العملات.


تحويل العملات إلى كلمات مع كوتولس ل إكسيل

يبدو رمز VBA الطويل هذا معقدًا. هنا سأقدم لك أداة مفيدة لحل هذه المشكلة بسهولة. مع ال أرقام إلى كلمات فائدة كوتولس ل إكسيل، لن يكون تحويل العملات إلى كلمات مشكلة بعد الآن. الرجاء القيام بما يلي.

قبل التطبيق كوتولس ل إكسيلالرجاء قم بتنزيله وتثبيته أولاً.

1. حدد الخلايا التي تحتوي على أرقام العملات التي تريد تحويلها.

2. انقر كوتولس > وصف المنتج > أرقام إلى كلمات. انظر لقطة الشاشة:

3. في ال الأرقام إلى كلمات العملات مربع الحوار، حدد عربي الخيار، وانقر فوق OK or التقديم .

الآن يتم تحويل أرقام العملات المحددة إلى كلمات إنجليزية على الفور.

  إذا كنت ترغب في الحصول على نسخة تجريبية مجانية (30 يومًا) من هذه الأداة المساعدة ، الرجاء الضغط لتنزيلهثم انتقل لتطبيق العملية حسب الخطوات المذكورة أعلاه.

أفضل أدوات إنتاجية المكتب

🤖 مساعد Kutools AI: إحداث ثورة في تحليل البيانات على أساس: التنفيذ الذكي   |  إنشاء التعليمات البرمجية  |  إنشاء صيغ مخصصة  |  تحليل البيانات وإنشاء الرسوم البيانية  |  استدعاء وظائف Kutools...
الميزات الشعبية: البحث عن التكرارات أو تمييزها أو تحديدها   |  حذف الصفوف الفارغة   |  دمج الأعمدة أو الخلايا دون فقدان البيانات   |   جولة بدون صيغة 
سوبر بحث: معايير متعددة VLookup    VLookup ذات القيمة المتعددة  |   VLookup عبر أوراق متعددة   |   بحث غامض ....
قائمة منسدلة متقدمة: إنشاء القائمة المنسدلة بسرعة   |  القائمة المنسدلة التابعة   |  قائمة منسدلة متعددة التحديد ....
مدير العمود: إضافة عدد محدد من الأعمدة  |  نقل الأعمدة  |  تبديل حالة رؤية الأعمدة المخفية  |  مقارنة النطاقات والأعمدة 
الميزات المميزة: التركيز على الشبكة   |  عرض تصميم   |   شريط الفورمولا الكبير    مدير المصنفات والأوراق   |  مكتبة الموارد (النص السيارات)   |  منتقي التاريخ   |  اجمع أوراق العمل   |  تشفير/فك تشفير الخلايا    إرسال رسائل البريد الإلكتروني عن طريق القائمة   |  سوبر تصفية   |   مرشح خاص (تصفية غامق / مائل / يتوسطه خط ...) ...
أفضل 15 مجموعة أدوات12 نص الأدوات (إضافة نص, إزالة الأحرف، ...)   |   +50 رسم الأنواع (مخطط جانت، ...)   |   40+ عملي الصيغ (احسب العمر على أساس تاريخ الميلاد، ...)   |   19 إدخال الأدوات (أدخل رمز الاستجابة السريعة, إدراج صورة من المسار، ...)   |   12 تحويل الأدوات (أرقام إلى كلمات, نتيجة تحويل عملة، ...)   |   7 دمج وتقسيم الأدوات (الجمع بين الصفوف المتقدمة, تقسيم الخلايا، ...)   |   ... و اكثر

عزز مهاراتك في Excel باستخدام Kutools for Excel، واختبر كفاءة لم يسبق لها مثيل. يقدم Kutools for Excel أكثر من 300 ميزة متقدمة لتعزيز الإنتاجية وتوفير الوقت.  انقر هنا للحصول على الميزة التي تحتاجها أكثر...

الوصف


يجلب Office Tab الواجهة المبوبة إلى Office ، ويجعل عملك أسهل بكثير

  • تمكين التحرير والقراءة المبوبة في Word و Excel و PowerPointوالناشر والوصول و Visio والمشروع.
  • فتح وإنشاء مستندات متعددة في علامات تبويب جديدة من نفس النافذة ، بدلاً من النوافذ الجديدة.
  • يزيد من إنتاجيتك بنسبة 50٪ ، ويقلل مئات النقرات بالماوس كل يوم!
Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Write the currency AED 3862.54 in words
This comment was minimized by the moderator on the site
can convert it to malaysian ringgit ?
This comment was minimized by the moderator on the site
Hi Warsha,

This type of conversion is not supported yet. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Hello help, I love your formula but I would like to update the formula so that it stays like the example in capital letters. Thanks a lot.
Example:
USD 121,500.56 = One Hundred Twenty One Thousand Five Hundred Dollars and Fifty Six Cents
***ONE HUNDRED TWENTY ONE THOUSAND FIVE HUNDRED AND 56/100 US DOLLARS

USD 121,500.00 = One Hundred Twenty One Thousand Five Hundred Dollars and No Cents
***ONE HUNDRED TWENTY ONE THOUSAND FIVE HUNDRED AND 00/100 US DOLLARS
This comment was minimized by the moderator on the site
Hi Angel,
The following VBA code can do you a favor. After adding the code to the Module (Code) window. Don't forget to apply this formula =NumberstoWords(cell) to get the result.
Function NumberstoWords(ByVal pNumber)
'Updated by Extendoffice 20221123
Application.Volatile

Dim Dollars, Cents
arr = Array("", "", " Thousand ", " Million ", " Billion ", " Trillion ")
pNumber = Trim(Str(pNumber))
xDecimal = InStr(pNumber, ".")

If xDecimal > 0 Then
    Cents = Left(Mid(pNumber, xDecimal + 1) & "00", 2)
    Cents = "AND " & Cents & "/100 US DOLLARS"
    pNumber = Trim(Left(pNumber, xDecimal - 1))
Else
    Cents = "AND " & "00/100 US DOLLARS"
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
End Select
NumberstoWords = UCase(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
This comment was minimized by the moderator on the site
Can you update the code to use Dinar and Fils .. Fils decimal is 3 .. means it has hundreds, tens and ones..
Thank you ..
This comment was minimized by the moderator on the site
Hi Naseem,
Perhaps the VBA code on the following page can help.
Convert numbers to words using Dinar and Fils.
This comment was minimized by the moderator on the site
Thank you so much ..
Can you update the to write the fills in number not word.
125.100 --> One Hundred Twenty Five Kuwaiti Dinar and 100 Fils Only

Thanks
This comment was minimized by the moderator on the site
Want a solution that doesn't require VBA?
Check it out here
See result in screenshot
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
I love your macro. Found one thing that doesn't quite work well. That's when there is a fractional. For instance if a field comes up as .835 excel rounds it up but the value is typed as "eighty three cents" while excel shows .84.
Work around for this?
This comment was minimized by the moderator on the site
Hi,
Sorry for the inconvenience. We have updated the code, please give it a try.

Function NumberstoWords(ByVal pNumber)
'Updated by Extendoffice 20220428
Dim Dollars, Cents
arr = Array("", "", " Thousand ", " Million ", " Billion ", " Trillion ")
pNumber = Trim(Str(pNumber))
pNumber = Round(pNumber, 2)
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
NumberstoWords = 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
This comment was minimized by the moderator on the site
This macro here helped me a lot, thank you so much for that. Our currency here in Kuwait has 3 digits after the decimal, could you help me with this?
This comment was minimized by the moderator on the site
If 45.67 is written as forty-five dollars, sixty-seven cents, how's 45.678 written? Is it forty-five dollars, six hundred and seventy-eight cents?
This comment was minimized by the moderator on the site
can't be changed the currency
This comment was minimized by the moderator on the site
Review the article Million billion trillion conversion beginner guideline to learn and understand about number system and number conversion.
This comment was minimized by the moderator on the site
currency is always in Dollar and cents, How can we change this to other currency?
This comment was minimized by the moderator on the site
You can change the code to your currency instead of "dollers"
This comment was minimized by the moderator on the site
Mr. Shaji can you guide with the steps Please
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations