kisinana
12-30-2024, 02:29 PM
Second issue I have.
I enter Overhaul and there parts on sheet 1 with all spares and extras
To make a formula work on sheet 1 I need to have a zero in the column.
When I move to sheet 2 I do not want to have parts at zero moved over but still want list to be from smallest to largest number.
I can use the formula to move just the parts alone but as soon as I enter number of parts all with zeroes move as well
Dim lr As Long, arrO, i As Long, j As Long
lr = Sheets("Overhaul").Cells(Rows.Count, 5).End(xlUp).Row
arrO = Array(1, 2, 5, 7)
j = 1
Application.ScreenUpdating = False
For i = LBound(arrO) To UBound(arrO)
Sheets("Overhaul").Cells(1, arrO(i)).Resize(lr).Copy
With Sheets("Progress").Cells(1, j)
.PasteSpecial xlPasteAll
.PasteSpecial xlPasteColumnWidths
End With
j = j + 1
Next i
Application.CutCopyMode = False
Application.ScreenUpdating = True
Range("G2").Select
End Sub
I enter Overhaul and there parts on sheet 1 with all spares and extras
To make a formula work on sheet 1 I need to have a zero in the column.
When I move to sheet 2 I do not want to have parts at zero moved over but still want list to be from smallest to largest number.
I can use the formula to move just the parts alone but as soon as I enter number of parts all with zeroes move as well
Dim lr As Long, arrO, i As Long, j As Long
lr = Sheets("Overhaul").Cells(Rows.Count, 5).End(xlUp).Row
arrO = Array(1, 2, 5, 7)
j = 1
Application.ScreenUpdating = False
For i = LBound(arrO) To UBound(arrO)
Sheets("Overhaul").Cells(1, arrO(i)).Resize(lr).Copy
With Sheets("Progress").Cells(1, j)
.PasteSpecial xlPasteAll
.PasteSpecial xlPasteColumnWidths
End With
j = j + 1
Next i
Application.CutCopyMode = False
Application.ScreenUpdating = True
Range("G2").Select
End Sub