اذهب الي المحتوي
أوفيسنا

عدد مرات تكرار كلمة من نص في الخلايا


khalidmoh

الردود الموصى بها

وعليكم السلام

انسخ الدالة المعرفة التالية (للأخ الحبيب مختار حسين) وضعها في موديول عادي Standard Module (من خلال Insert ثم اختر الأمر Module)

Function MokhtarCountif(MyVal As String, AddressRange As Range) As Long
    Dim C As Range, Total As Long, Arr() As String, J As Integer
    
    Application.Volatile True
    
    For Each C In AddressRange.Cells
        Arr = Split(C, " ")
        For J = LBound(Arr) To UBound(Arr)
            If Arr(J) = MyVal Then
                On Error Resume Next
                Total = Total + 1
                On Error GoTo 0
            End If
        Next J
    Next C
    
    MokhtarCountif = Total
End Function

ثم استخدم المعادلة التالية في ورقة العمل بهذا الشكل

=MokhtarCountif("الله",C2:C5)

 

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information