00 07/12/2020 18:20
Re: Re: Re:
tanimon, 07/12/2020 18:09:



ciao
puoi usare
vb
target.value


con un if Then, prima del for Each, tagliando ed incollando il codice sull'evento Worksheet_Change

N.B.
"Resina" è diverso da "resina"

prova, sono certo che ce la puoi fare

ciao
Frank




ci ho provato:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ur As Long, cella As Range
ur = Cells(Rows.Count, "n").End(xlUp).Row
If Not Intersect(Target, Range("h2:h1900")) Is Nothing Then
If Target.Value Then ' prova
For Each cella In Worksheets("Deposito GOMME").Range("n2:n" & ur)
If cella.Value = "Resina" Then
Cells(cella.Row, "j").Value = "depositare"
End If
Next cella
End If



End If
End Sub


OVVIAMENTE non funziona!