Count how many qty's are greater than "0" (or blank) which make the SUMIF total

ellison

Active Member
Joined
Aug 1, 2012
Messages
356
Office Version
  1. 365
Platform
  1. Windows
Hi, we are working on some info and are wondering if it's possible to find out how many of the raw quantities which make up the SUMIF total for each "info" are > zero, or blank.

Hopefully I've explained this a little better on this :) :

Countifs-But-With-Criteria-Like-Sumif-01.xlsx
ABCDE
1RowInfoRaw AmtSUMIF Amt For the Whole "Info"COUNTIF of how many qty's for each "info" > 0 or Blank
22alpha162
33alpha062
44alpha562
55beta00
66beta00
77charlie16923
88charlie923
99charlie31923
1010charlie45923
Sheet1
Cell Formulas
RangeFormula
D2:D10D2=SUMIF($B$2:$C$10,B2,$C$2:$C$10)
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi, we are working on some info and are wondering if it's possible to find out how many of the raw quantities which make up the SUMIF total for each "info" are > zero, or blank.

Hopefully I've explained this a little better on this :) :

Countifs-But-With-Criteria-Like-Sumif-01.xlsx
ABCDE
1RowInfoRaw AmtSUMIF Amt For the Whole "Info"COUNTIF of how many qty's for each "info" > 0 or Blank
22alpha162
33alpha062
44alpha562
55beta00
66beta00
77charlie16923
88charlie923
99charlie31923
1010charlie45923
Sheet1
Cell Formulas
RangeFormula
D2:D10D2=SUMIF($B$2:$C$10,B2,$C$2:$C$10)

Are you counting both criteria then? To my understanding, based on your criteria, info "beta" should show 2 in col E and info "charlie" should show 4 in col E, counting the number of raw amt both >0 and blank. If it's one or the other, then "beta" should still show 2?

That is if col E are the expected results?
 
Upvote 0
Hi, yes Col E is expected results (hopefully!)

The reason that beta is "0" is that the corresponding amounts are both blank.
And charlie shows "3" as there is 1 blank and also 3 amounts which are greater than zero.

Hope that helps
 
Upvote 0
Hi, yes Col E is expected results (hopefully!)

The reason that beta is "0" is that the corresponding amounts are both blank.
And charlie shows "3" as there is 1 blank and also 3 amounts which are greater than zero.

Hope that helps

So, when should it count blanks instead of amounts greater than 0?
 
Upvote 0
Hopefully it will only count qty's > 0.

(In other words, not count blanks or zero qty's)
 
Upvote 0
Hopefully it will only count qty's > 0.

(In other words, not count blanks or zero qty's)

Okay, well if you're hoping to never count blanks, give this a shot:

Book1
ABCDEF
1RowInfoRaw AmtSUMIF Amt For the Whole "Info"COUNTIF of how many qty's for each "info" > 0 or Blank
22alpha1622
33alpha0622
44alpha5622
55beta000
66beta000
77charlie169233
88charlie9233
99charlie319233
1010charlie459233
Sheet3
Cell Formulas
RangeFormula
D2:D10D2=SUMIF($B$2:$C$10,B2,$C$2:$C$10)
F2:F10F2=COUNTIFS($B$2:$B$10,B2,$C$2:$C$10,">0")
 
Upvote 0
Solution

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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