اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

هل يمكن البحث عن عميل ودفعة من جدول الدفعات واضافة مدفوع او غير مدفوع في جدول كشف الحساب


jihad1972
إذهب إلى أفضل إجابة Solved by سليم حاصبيا,

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

  • أفضل إجابة

اقترح هذا الماكرو

Option Explicit

Sub CALCUL()
Dim MY_DIC As Object
Dim K, m#, x%: x = 3
Set MY_DIC = CreateObject("Scripting.Dictionary")
With MY_DIC
    Do Until Range("B" & x) = vbNullString
        K = Range("B" & x): m = Range("D" & x)
            If Not .exists(K) Then
               .Add K, m
            Else
               MY_DIC(K) = MY_DIC(K) + m
            End If
             x = x + 1
     Loop
        Range("F3").Resize(.Count) = _
        Application.Transpose(.Keys)
        Range("G3").Resize(.Count) = _
        Application.Transpose(.Items)
    .RemoveAll: Set MY_DIC = Nothing
End With
End Sub

الملف مرفق

 

Working_with_dictionary.xlsm

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

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