How to generate a list of items if quantity greater than 1

frankheon

New Member
Joined
Jun 16, 2015
Messages
5
<!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--> Hello all,

I'm no expert in excel but I know my way around vba and formulas. However I need your help.

I have a main sheet with a list of 100 items that users may select and choose the quantity for any given item using drop lists.


The data of the main sheet is then transferred to a second sheet where it extracts duplicates and add up all the quantities for any given item. However, this sheet lists all 100 items with their respective quantities in the adjacent cell, many of which have 0 as quantity.

Now what I need is a way to extract all items that have at least 1 quantity and to “populate” a final list which would show only the items that have quantities and their respective quantities.


I could then print or send this final sheet for ordering the requested items that users need.


Can somebody help me how to go about this. Here is an sample of what I mean




Itemsqtyresult I needqty
item10item22
item22item31
item31item66
item40item72
item50
item66
item72

<tbody>
</tbody>


<tbody>
</tbody>
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I need something that does this automatically. Currently, my macro will print the second sheet with the entire list of items but considering items have grown to 100+, I need to filter out the items with no quantity. but I need this to be done automatically and in real-time.
possible?
 
Upvote 0
Yes, just record a macro that filters out the zeroes and blanks from the quantity column and add it to your existing code
 
Last edited:
Upvote 0
Here is a formula way.
The formula in column D is an array formula and must be entered with CTRL-SHIFT-ENTER.
Copy formulas down as needed.
Excel Workbook
ABCDEF
1Itemsqtyresult I needqty
2item10item22
3item22item31
4item31item66
5item40item72
6item50
7item66
8item72
9
Sheet
 
Upvote 0
unfortunately this does not workout. All I get is D2 = item1 and E2 = 0 the rest is blank when if I copy down the formula onto the other cells. Woruld vba then be easier. I was trying to avoid vba to refrain from using copy&paste within the code
 
Upvote 0
Note this is an array formula in D2 and on a PC it must be entered with CTRL-SHIFT-ENTER.
If you just hit enter it will return the wrong answer of item1.
 
Upvote 0
Did you try the filter?


Excel 2010
AB
1Itemsqty
2item10
3item22
4item31
5item4
6item5
7item66
8item72
9
10
11
12
13
14result I needqty
15item22
16item31
17item66
18item72
Sheet10



Filter out zeroes and blanks:


Excel 2010
AB
1Itemsqty
3item22
4item31
7item66
8item72
9
10
11
12
13
14result I needqty
15item22
16item31
17item66
18item72
Sheet10
 
Upvote 0
thanks all for your feedback and help.
Even if I wanted to avoid VBA, It was finally the best way to go at it at the end of the day.
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,165
Members
448,870
Latest member
max_pedreira

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