Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$" & Target.Row Or Target.Address = "$B$" & Target.Row Then
Application.EnableEvents = False
Range("C" & Target.Row).Formula = "=A" & Target.Row & "*B" & Target.Row
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Or Target.Address = "$B$1" Then
Application.EnableEvents = False
Range("C1").Formula = "=A1*B1"
End If
Application.EnableEvents = True
End Sub