1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub Attenzione()
Dim i As Long, j As String, r As Range
Application.ScreenUpdating = False
DerLig = Range("A" & Rows.Count).End(xlUp).Row
Range("J2:K" & DerLig).FormulaR1C1 = "=RC1&"" ""&RC[-2]*1"
Range("J2:K" & DerLig).Value = Range("J2:K" & DerLig).Value
For i = 2 To DerLig
j = Cells(i, 10)
Set r = Columns(11).Find(j, LookAt:=xlWhole)
If Not r Is Nothing Then
Cells(i, "J") = "Attenzione"
Cells(r.Row, "J") = "Attenzione"
End If
Next i
For i = 1 To DerLig
If Cells(i, "J") <> "Attenzione" Then Cells(i, "J").ClearContents
Next i
Columns(11).ClearContents
End Sub |
Partager