Public Sub Zona_1_cerca_e_aggiungi_riga_sopra_Nome1()
y = Range("d1").Address
X = Range("d1").End(xlDown).Address
Set elenco = Range(X, y)
For Each cl In elenco
If cl = Cells(2, 1) Then
cl.Select
ActiveCell.Offset(0, 0).EntireRow.Insert
Sheets("Foglio1").Select
Range("E5:W5").Select
Selection.Copy
Range("D65000").End(xlUp).Offset(-1, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Exit For
End If
Next
End Sub
Public Sub Zona_2_cerca_e_aggiungi_riga_sopra_Nome2()
y = Range("c1").Address
X = Range("c1").End(xlDown).Address
Set elenco = Range(X, y)
For Each cl In elenco
If cl = Cells(3, 1) Then
cl.Select
ActiveCell.Offset(0, 0).EntireRow.Insert
Sheets("Foglio1").Select
Range("E5:W5").Select
Selection.Copy
Range("C65000").End(xlUp).Offset(-1, 2).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Exit For
End If
Next
End Sub
Public Sub Zona_3_cerca_e_aggiungi_riga_sopra_Nome3()
y = Range("b1").Address
X = Range("b1").End(xlDown).Address
Set elenco = Range(X, y)
For Each cl In elenco
If cl = Cells(4, 1) Then
cl.Select
ActiveCell.Offset(0, 0).EntireRow.Insert
Sheets("Foglio1").Select
Range("E5:W5").Select
Selection.Copy
Range("B65000").End(xlUp).Offset(-1, 3).Select _
ActiveSheet.Paste
Application.CutCopyMode = False
Exit For
End If
Next
End Sub
|