بعد أذن اخي الغالي ياسر
و اثراءً للموضوع اسمحوا لي بأن اتدخل بهذا الكود
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Not Intersect(Target, Range("b1:i15")) Is Nothing And Target.Count = 1 Then
all_rows
GoTo 1
End If
1:
Application.ScreenUpdating = True
End Sub
Sub all_rows()
Dim My_first_nb As Integer
Dim My_sec_nb As Integer
Dim Myrg As Range
Set Myrg = Range("b1:i15")
My_first_nb = 1
My_sec_nb = 2
For Each cel In Myrg
If cel.Value = My_first_nb Then
Cells(cel.Row, 2).Resize(1, 8) = 50
ElseIf cel.Value = My_sec_nb Then
Cells(cel.Row, 2).Resize(1, 8) = 100
End If
Next
End Sub