ciao a tutti
ciao Matteo,
non riesco ad inserire nel tagCode
in un modulo
Sub copia()
Dim sh As Worksheet, sh1 As Worksheet
Dim ur As Long, ur1 As Long, r As Long, n As Long
Dim contatore As Integer
Application.ScreenUpdating = False
Set sh = Sheets("Foglio1")
Set sh1 = Sheets("Foglio3")
ur = sh.Cells(Rows.Count, "d").End(xlUp).Row
ur1 = sh1.Cells(Rows.Count, "a").End(xlUp).Row + 1
With sh
.Activate
For r = 1 To ur ' parto dalla riga 2 se ci sono intestazioni
contatore = sh.Cells(r, "d").Value
For n = 1 To contatore
sh.Range(Cells(r, 1), Cells(r, 3)).Copy sh1.Cells(ur1, 1)
ur1 = ur1 + 1
Next n
Next r
End With
sh1.Activate
Application.ScreenUpdating = True
Set sh = Nothing
Set sh1 = Nothing
End Sub
prova e fai sapere
ciao
Frank
[Modificato da tanimon 13/08/2019 10:42]
Stretta la foglia, larga la via, dite la vostra che ho detto la mia.
Excel 2007 forse anche 2013 ... 2021 ... 365 e future...