consolidate and count if quantity is not zero

Vagus

New Member
Joined
Jul 31, 2018
Messages
5
Hello and Thank You in advance!
Column B is what I want to consolidate and count. I only want it to appear on the consolidated list If correlated column C has a value greater than zero.
[TABLE="width: 354"]
<tbody>[TR]
[TD][TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="width: 127"]
<tbody>[TR="class: grid"]
[TD="width: 127"]Bid Code[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 166"]
<tbody>[TR="class: grid"]
[TD="width: 166"]Breakdown Code[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 61"]
<tbody>[TR="class: grid"]
[TD="width: 61"]Quantity[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 127"]
<tbody>[TR="class: grid"]
[TD="width: 127"]1LPostGLLM10ft3x6[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 166"]
<tbody>[TR="class: grid"]
[TD="width: 166"]GLLM 3-1/8 x 6 @ 10ft[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD][TABLE="width: 127"]
<tbody>[TR="class: grid"]
[TD="width: 127"]1LPostGLLM10ft5x8[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 166"]
<tbody>[TR="class: grid"]
[TD="width: 166"]GLLM 5-1/8 x 7-1/2 @ 10ft[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD][TABLE="width: 127"]
<tbody>[TR="class: grid"]
[TD="width: 127"]2LPostGLLM10ft3x6[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 166"]
<tbody>[TR="class: grid"]
[TD="width: 166"]GLLM 3-1/8 x 6 @ 10ft[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD][TABLE="width: 127"]
<tbody>[TR="class: grid"]
[TD="width: 127"]2LPostGLLM10ft5x8[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 166"]
<tbody>[TR="class: grid"]
[TD="width: 166"]GLLM 5-1/8 x 7-1/2 @ 10f[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD]3LPostGLLM10ft3x6[/TD]
[TD]GLLM 3-1/8 x 6 @ 10ft[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD][TABLE="width: 127"]
<tbody>[TR="class: grid"]
[TD="width: 127"]3LPostGLLM10ft5x8[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 166"]
<tbody>[TR="class: grid"]
[TD="width: 166"]GLLM 5-1/8 x 7-1/2 @ 10f[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD]4LPostGLLM10ft3x6[/TD]
[TD]GLLM 3-1/8 x 6 @ 10ft[/TD]
[TD="align: center"]4[/TD]
[/TR]
[TR]
[TD][TABLE="width: 127"]
<tbody>[TR="class: grid"]
[TD="width: 127"]4LPostGLLM10ft5x8[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 166"]
<tbody>[TR="class: grid"]
[TD="width: 166"]GLLM 5-1/8 x 7-1/2 @ 10f[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]7[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
Thanks again for any help.
 
it looks like

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#70AD47]
Bid Code​
[/td][td=bgcolor:#70AD47]
Breakdown Code​
[/td][td=bgcolor:#70AD47]
Quantity​
[/td][td]Column1[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#FF00FF]1LPostGLLM10ft3x6[/td][td=bgcolor:#FF00FF]GLLM 3-1/8 x 6 @ 10ft[/td][td=bgcolor:#FF00FF]
#NAME?​
[/td][td]=ETkoBidQty("1LPostGLLM10ft3x6")[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#FF00FF]1LPostGLLM12ft3x6[/td][td=bgcolor:#FF00FF]GLLM 3-1/8 x 6 @ 12ft[/td][td=bgcolor:#FF00FF]
#NAME?​
[/td][td]=ETkoBidQty("1LPostGLLM12ft3x6")[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#FF00FF]1LPostGLLM4ft3x6[/td][td=bgcolor:#FF00FF]GLLM 3-1/8 x 6 @ 4ft[/td][td=bgcolor:#FF00FF]
#NAME?​
[/td][td]=ETkoBidQty("1LPostGLLM4ft3x6")[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#FF00FF]1LPostGLLM6ft3x6[/td][td=bgcolor:#FF00FF]GLLM 3-1/8 x 6 @ 6ft[/td][td=bgcolor:#FF00FF]
#NAME?​
[/td][td]=ETkoBidQty("1LPostGLLM6ft3x6")[/td][/tr]
[/table]
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
here is the result
https://1drv.ms/x/s!AopTvf3RGAN5kBDeEQxpsEsdX0_h

M code
Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Bid Code", type text}, {"Breakdown Code", type text}, {"Quantity", Int64.Type}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Quantity] <> 0)),
    #"Grouped Rows" = Table.Group(#"Filtered Rows", {"Breakdown Code"}, {{"Sum", each List.Sum([Quantity]), type number}}),
    #"Sorted Rows" = Table.Sort(#"Grouped Rows",{{"Breakdown Code", Order.Ascending}})
in
    #"Sorted Rows"

to do that you'll need PowerQuery (Excel 2010/2013 add-in, 2016 built-in)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,226,230
Messages
6,189,768
Members
453,568
Latest member
LaTwiglet85

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