وعليكم السلام ورحمه الله وبركاته
تفضل
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim X
If (Target.Column = 5 And Target.Row > 11) Then
X = Application.Match(Target.Offset(0, -2), Sheet2.Range("C1:C" & Sheet2.Cells(Rows.Count, "C").End(xlUp).Row), 0)
If Target.Value > Sheet2.Range("K" & X) Then
MsgBox "noooooooooooooooo"
Target.Value = ""
Else
Sheet2.Cells(X, 9).Formula = "=" & Sheet2.Range("I" & X) & "+" & Target.Value
End If
End If
Application.EnableEvents = True
End Sub