
Option Explicit Sub Ver_copia() Dim i As Long Dim F1 As String, F2 As String F1 = "Foglio 1" F2 = "Foglio 2" If Sheets(F2).Cells(7, "F") <> 1 Then MsgBox "Valori inseriti Non Validi" Exit Sub End If For i = 40 To Sheets(F1).Cells(Rows.Count, 1).End(xlUp).Row If Sheets(F2).Cells(5, "B") = Sheets(F1).Cells(i, "A") Then Sheets(F1).Cells(i, "B") = Sheets(F2).Cells(5, "J") Sheets(F1).Cells(i, "C") = Sheets(F2).Cells(5, "K") Sheets(F1).Cells(i, "D") = Sheets(F2).Cells(5, "L") Exit For End If Next i MsgBox "OK" End Sub |
