Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Not Target.Address = "$A$1" Then Exit Sub
Application.EnableEvents = False
Range("F1:F3").Value = Application.Transpose(Array("Isabel", "Pedro", "Date"))
Application.EnableEvents = True
End Sub
If the three text values being assign to F1:F3 are really unchanging text constants (not variables), then the above highlighted code line can be replaced with this one...How aboutThis needs to go in the sheet moduleCode:Private Sub Worksheet_Change(ByVal Target As Range) If Target.CountLarge > 1 Then Exit Sub If Not Target.Address = "$A$1" Then Exit Sub Application.EnableEvents = False [B][COLOR="#FF0000"]Range("F1:F3").Value = Application.Transpose(Array("Isabel", "Pedro", "Date"))[/COLOR][/B] Application.EnableEvents = True End Sub
[F1:F3] = [{"Isabel";"Pedro";"Date"}]
If I am reading the above correctly...If K33 = Done
R34 = Closed
R36 = Confirmed
IF Range("K33").Value = "Done" Then
Range("R34").Value = "Closed"
Range("R36").Value = "Confirmed"
End If
in an autorun macro and if de K33 value change
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Not Target.Address(0, 0) = "K33" Then Exit Sub
Application.EnableEvents = False
If Target.Value = "Done" Then
Range("R34").Value = "Closed"
Range("R36").Value = "Confirmed"
End If
Application.EnableEvents = True
End Sub
Code:Private Sub Worksheet_Change(ByVal Target As Range) If Target.CountLarge > 1 Then Exit Sub If Not Target.Address(0, 0) = "K33" Then Exit Sub Application.EnableEvents = False If Target.Value = "Done" Then Range("R34").Value = "Closed" Range("R36").Value = "Confirmed" End If Application.EnableEvents = True End Sub