السلام عليكم وكل عام وحضرتكم بخير --مرفق شيك اكسل وهو كشف حساب للمورد وكان ناجح معايا باستخدام المعاددلات ولكن بسبب كثرة عدد الموردين وكثرة البيانات لمدة تجاوزت 5 سنوات من البيانات اصبح ثقيل وضخم فى الحجم فقررت الاستغاناء عن المعادلات واستبدالها بالاكواد وهذا هو الكود
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim d As Variant
Dim f As Variant
Dim e As Integer
e = d + f
For d = 4 To 99
For f = 100 To 1000 Step 100
Cells(d, 1).Value = Val(Cells(d, 3).Value - Cells(d, 2).Value + Cells(d - 1, 1).Value)
Cells(d, 12).Value = Val(Cells(d, 11).Value * Cells(d, 10).Value)
Cells(d, 14).Value = Val(Cells(d, 13).Value * Cells(d, 10).Value)
Cells(d, 10).Value = Val(Cells(d, 9).Value * Cells(d, 8).Value)
Cells(d + f - 3, 1).Value = Val(Cells(d + f - 3, 3).Value - Cells(d + f - 3, 2).Value + Cells(d + f - 4, 1).Value)
Cells(d + f - 3, 12).Value = Val(Cells(d + f - 3, 11).Value * Cells(d + f - 3, 10).Value)
Cells(d + f - 3, 14).Value = Val(Cells(d + f - 3, 13).Value * Cells(d + f - 3, 10).Value)
Cells(d + f - 3, 10).Value = Val(Cells(d + f - 3, 9).Value * Cells(d + f - 3, 8).Value)
Next
Next
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub