Extract rows with value >=1 to another sheet

bobbieatendido

New Member
Joined
Jul 13, 2016
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Hi,

I would like to ask for help. I need to extract rows when it meets the criteria >=1.

EX:

Complete Product Sheet:
ProdCodeProdDescQty
1001Prod10
1002Prod21
1003Prod32
1004Prod40
1005Prod51

<tbody>
</tbody>

Order Product Sheet:
ProdCodeProdDescQty
1002Prod21
1003Prod32
1005Prod51

<tbody>
</tbody>

Thank you
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Maybe this

Code:
Sub MM1()
 With Sheets("Complete Product Sheet").UsedRange
            .AutoFilter
            .AutoFilter field:=3, Criteria1:=">=1"
            .Resize(.Rows.Count).SpecialCells(xlCellTypeVisible).Copy Sheets("Order Product Sheet").Range("A1")
            .AutoFilter
    End With
End Sub
 
Upvote 0
Hi Michael,

Thank you for your reply.
Its not working. :(

I'll complete my info, sorry about that.
So my "Complete Product Sheet" looks like this:


ABCDEFGHIJKL
CN

<tbody>
</tbody>
Dept

<tbody>
</tbody>
Group

<tbody>
</tbody>


010118

<tbody>
</tbody>
Std Cost

<tbody>
</tbody>
SOURCE

<tbody>
</tbody>
Code

<tbody>
</tbody>
Description

<tbody>
</tbody>
Price

<tbody>
</tbody>
QTY
2(info)(info)(info)(info)(info)(info)(info)1001
Prod11000
3(info)(info)(info)(info)(info)(info)(info)1002Prod2200
1
4(info)(info)(info)(info)(info)(info)(info)1003
Prod33002
5(info)(info)(info)(info)(info)(info)(info)1004Prod44000
6(info)(info)(info)(info)(info)(info)(info)1005Prod55001

<tbody>
</tbody>

also, in Col. L, the Qty "0 1 2 0 1" is a code which is "=vlookup...".

I need to extract only the row with ">=1" to another sheet "Order Product Sheet".
Which will be CN 3, 4 and 6.

Thank you.
 
Last edited:
Upvote 0
So, you want the dat that is greater than 1 in column L to be copied to the other sheet ??

Code:
Sub MM1()
 With Sheets("Complete Product Sheet").UsedRange
            .AutoFilter
            .AutoFilter field:=12, Criteria1:=">=1"
            .Resize(.Rows.Count).SpecialCells(xlCellTypeVisible).Copy Sheets("Order Product Sheet").Range("A1")
            .AutoFilter
    End With
End Sub
 
Upvote 0
Solution
Hi Michael,

Where do i put the code?

VBAProject

Sheet1 (Complete Product Sheet)
Sheet2 (Order Product Sheet)

or should i create a macro and put the code there?

Thank you so much for your help.
 
Upvote 0
In The "ThisWorkbook" module or Insert>>Module>>Paste in RH window
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,831
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top