| | Post: 1.151 | Registrato il: 24/06/2015
| Città: CATANIA | Età: 80 | Utente Veteran | Excel2019 | | OFFLINE |
|
04/10/2023 09:26 | |
Ciao
@L2018
Mi sembra abbastanza veloce.
@Melissa2018
Prova a modificare la tua macro così
Sub INCOLONNAMENTO()
Sheets("INCOLONNAMENTO CON MACRO").Select
Dim I As Long'Integer
Range("E3:G10000").ClearContents
Application.ScreenUpdating = False
Range(Cells(3, 1), Cells(3, 3)).Copy
Range("E3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Application.CutCopyMode = False
For I = 4 To Range("A" & Rows.Count).End(xlUp).Row
If Cells(I, 1) > Cells(Range("E" & Rows.Count).End(xlUp).Row, 5) Then
Range(Cells(I, 1), Cells(I, 3)).Copy
Cells(Range("E" & Rows.Count).End(xlUp).Row + 1, 5).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Application.CutCopyMode = False
End If
If Cells(I, 2) - Cells(Range("E" & Rows.Count).End(xlUp).Row, 6) >= Cells(1, 7) Then
Range(Cells(I, 1), Cells(I, 4)).Copy
Cells(Range("E" & Rows.Count).End(xlUp).Row + 1, 5).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Application.CutCopyMode = False
End If
Next I
Application.CutCopyMode = False
Application.ScreenUpdating = True
Cells(1, 5).Select
End Sub
Fai sapere. Ciao,
Mario [Modificato da Marius44 04/10/2023 09:27] |
|
|