Ciao giuseppe,
la seconda macro non incolla come chiedevo.
Dopo molte modifiche ho modificato la prima macro così:
Option Explicit
Sub Aggiorna()
Application.ScreenUpdating = False
Dim NrcX As Long, NrC As Long, x As Long
NrC = Range("A" & Rows.Count).End(xlUp).Row
If NrC < 2 Then NrC = 3
Range(Cells(2, 1), Cells(NrC, 18)).ClearContents '<<< 2,1 = A1 5=E
With Worksheets("dividi") '<<< nome foglio
NrcX = .Range("A" & Rows.Count).End(xlUp).Row
NrC = 3 '<< copia in riga 2
For x = 3 To NrcX '<<< parte da riga 3
Range(.Cells(x, 1), .Cells(x, 18)).Copy
Cells(NrC, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
NrC = NrC + 2
Next x
End With
With Worksheets("descrizione")
NrcX = .Range("A" & Rows.Count).End(xlUp).Row
NrC = 4 '<<< copia in riga 3
For x = 3 To NrcX '<<< parte da riga 3
Range(.Cells(x, 1), .Cells(x, 18)).Copy
Cells(NrC, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
NrC = NrC + 2
Next x
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
Cells(2, 1).Select
End Sub
che gira bene per la mia seconda richiesta.
Mi puoi scrivere nella macro quali sono le righe che copia?
max
____________________________
versione excel 365 ufficio
versione excel 2007 casa