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

تعديل في ماكرو


deebsagheer

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

اليك الكود بعد التعديل

Sub hhh()
 Dim aa As Range, bb As Range, cc As Range, dd As Range, ee As Range, ff As Range, gg As Range, MyDate As String, MyDate2 As String
 Set aa = Range("sumrange")
 Set bb = Range("criteria")
 Set cc = Range("range1")
 Set dd = Range("criteria1")
 Set ee = Range("range2")
 Set ff = Range("range3")
 MyDate = ">=" & CDate(cc)
 MyDate2 = ">" & CDate(ff)

 For i = 3 To [A10000].End(xlUp).Row
 Cells(i, 2) = Application.SumIfs(aa, bb, MyDate, dd, Cells(i, 1)) - Application.SumIfs(aa, bb, MyDate2, dd, Cells(i, 1))
 Next
 
 Set aa = Nothing
 Set bb = Nothing
 Set cc = Nothing
 Set dd = Nothing
 Set ee = Nothing
 Set ff = Nothing
End Sub
رابط هذا التعليق
شارك

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