Ciao a tutti.
La macro allegata funziona per le colonne I:H è possibile modificarla perchè funzioni solo per il range
I6:I17 / H6:H17 ?
grazie
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Columns("I")) Is Nothing Then Exit Sub
If Target.CountLarge > 1 Then Exit Sub
On Error GoTo SafeExit
Application.EnableEvents = False
If LCase$(Me.Range("G1").Value) = "aggiornato" Then
MsgBox "Already updated!", vbCritical
Me.Range("H" & Target.Row & ":I" & Target.Row).ClearContents
' Application.Undo
GoTo SafeExit
End If
If Me.Cells(Target.Row, "H").Value = "" Or Target.Value = "" Then GoTo SafeExit
Me.Range("F2:F4").Value = Me.Cells(Me.Rows.Count, "I").End(xlUp).Value
Me.Range("G1").Value = "aggiornato"
SafeExit:
Application.EnableEvents = True
End Sub