I need a formula or VBA to copy values to another sheet and omit blanks and zeros

belalb3

New Member
Joined
Jan 10, 2011
Messages
4
Hello,
I have a table with 900 maintenance parts. I select the items I want for example 20 items. then I need to go to another sheet and list the items I picked.

In the second sheet, I'm interested in getting the description, value, and quantity only. For now, I'm manually copying the description to the second sheet, and to get the value and quantity, I run a vlookup.

I was trying to find a formula to get the description insted of copying them one by one. I tried if function, but the issue is if-function is pulling the items with "0" in quantity.


I'm interested in getting the description for items that have a quantity greater than 0 and omit the rows with zero/blank quantity

below is an example of the table. Is there a way to do this with formula or VBA?

Product nameDescriptionValueQuantity
CarItem 1$ 1,000.00
2​
CarItem 2$ 500.00
2​
CarItem 3$ 250.00
0​
CarItem 4$ 100.00
Total$ 1,850.00
4​

I would appreciate if anyone could help me with this!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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