قم بإضافة زر و اكتب الكود التالي
Private Sub CommandButton1_Click()
For t = 1 To 100
If Val(Cells(t, 1).Value) > Val(Cells(t, 2).Value) Then
Cells(t, 2).Value = Val(Cells(t, 1).Value)
ElseIf Val(Cells(t, 1).Value) < Val(Cells(t, 3).Value) Then Cells(t, 3).Value = Val(Cells(t, 1).Value)
ElseIf Val(Cells(t, 1).Value) < Val(Cells(t, 2).Value) Then Exit Sub
ElseIf Val(Cells(t, 1).Value) = Val(Cells(t, 2).Value) Or Val(Cells(t, 1).Value) = Val(Cells(t, 3).Value) Then Exit Sub
End If
Next
End Sub