السلام عليكم
جرب الكود التالي
Sub KH_START()
Dim cel As Range
Dim LR As Integer, M As Integer, c As Integer
With ورقة2
LR = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
M = Val(CStr(Application.Match(ورقة1.[F1], .Range("A2:A" & LR), 0)))
If M Then
M = M + 1
For c = 1 To 5
.Cells(M, c + 2).Value = Val(.Cells(M, c + 2)) + Val(ورقة1.Range("B8").Cells(1, c))
Next
Else
.Cells(LR, "A").Value = ورقة1.[F1]
.Cells(LR, "B").Value = ورقة1.[C1]
.Cells(LR, "C").Resize(1, 5).Value = ورقة1.Range("B8:F10").Value
End If
End With
ورقة1.Range("C1,B8:F10").ClearContents
End Sub
المرفق 2010
T.rar