تفضل الكود وقم باستدعائه كيفما شئت
Option Explicit
Sub sh14jun2018()
Dim rng1, rng2, rng3 As Range
Dim i, j, x As Long
Range("d11").CurrentRegion.Interior.Color = xlNone
Range("d" & Rows.Count).End(xlUp).Offset(, 1) = ""
Set rng1 = Range("e11", Range("e11").End(xlDown))
i = rng1.Rows.Count - 2
Set rng1 = Range("e11", Range("e11").Offset(i))
Set rng1 = Range(rng1, rng1.End(xlToRight))
j = rng1.Columns.Count
Select Case j Mod 2
Case Is = 0
j = j / 2
rng1(j).Select
Selection.Resize(i + 1).Select
Selection.Interior.Color = 49407
Set rng2 = Range(Selection, Selection.End(xlToLeft))
x = Application.WorksheetFunction.Sum(rng2)
Range("E" & Rows.Count).End(xlUp).Offset(1) = x
Case Is > 0
j = Int(j / 2) + 1
rng1(j).Select
Selection.Resize(i + 1).Select
Selection.Interior.Color = 49407
Set rng2 = Range(Selection, Selection.End(xlToLeft))
x = Application.WorksheetFunction.Sum(rng2)
Range("E" & Rows.Count).End(xlUp).Offset(1) = x
End Select
End Sub