I have a long "Product list" worksheet in which to select quantities needed to complete a project. If the quantity in certain rows is greater than 0, I want it to push that row to the "order" worksheet. Can anybody help me?
I have a long "Product list" worksheet in which to select quantities needed to complete a project. If the quantity in certain rows is greater than 0, I want it to push that row to the "order" worksheet. Can anybody help me?
Can you give us some of the data structure of the workbook, like What column are the quantities in? Does the whole row need to be copied over? It would be better if you can upload a workbook of the data and show the expected results on the other sheet.
Thanks,
Mike
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved.
Sure, thanks for your interest in helping me.
Ok give this a try
![]()
Sub abc() Const shProducts As String = "Products" '<=== Products sheets name Const shOrder As String = "Order Sheet" '<=== Order Sheets name Dim CellPtr As Long, Destrow As Long Destrow = 2 Worksheets(shOrder).Cells.Clear With Worksheets(shProducts) .Cells(1, 1).Resize(, 4).Copy Worksheets(shOrder).Cells(1, 1) For CellPtr = 2 To .Cells(Rows.Count, 4).End(xlUp).Row If .Cells(CellPtr, 4) > 0 Then .Cells(CellPtr, 1).Resize(, 4).Copy _ Worksheets(shOrder).Cells(Destrow, 1) Destrow = Destrow + 1 End If Next End With End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks