Help... Count Values excluding SUBTOTAL

santhoshlk

Board Regular
Joined
Feb 6, 2006
Messages
206
Dear friends...

I have product range wise random values in column D, and there are subtotals for each ranges in the same column

I need to count the cells where numbers are not equal to zero, but i want to exclude subtotal cells..

how this is possible?
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Re: Help... Count Values excluding 0

try this:

Code:
=COUNTIF(D1:D10,"<>0")

if this is not what you need give a sample of your data
 
Upvote 0
Re: Help... Count Values excluding 0

Hi,

What version of Excel are you using? Are your "subtotals" actual SUBTOTAL formulas?

Can you post a small sample along with your desired result?

Regards
 
Upvote 0
Re: Help... Count Values excluding 0

THANKS bUDDY,

i tried this formaula earlier, but it calculates subtotal cells also... i need tol exclude subtotal cells
 
Upvote 0
Re: Help... Count Values excluding 0

give as sample data. SUMPRODUCT will do the trick for you but we need to see how data looks like.

also (as per XOR post) let as know what version of excel are you using.

If you have Excel 2007 or later you can use COUNTIFS formula
 
Upvote 0
Re: Help... Count Values excluding 0

iam using office 2003 and they are actual subtotal formulas

6
0
5
Sub 11
2
3
0
Sub 5

Result for count cells value <>0 excluding subtotals should be 4
 
Upvote 0
Re: Help... Count Values excluding 0

So do those cells actually contain the word "Sub" at the start? So you have something like:

="Sub "&SUBTOTAL(9,A1:A3)

etc.?

Regards
 
Upvote 0
Re: Help... Count Values excluding 0

my formulas are like =SUBTOTAL(9,B5:B7).... all contains the word sub at start
 
Upvote 0
Re: Help... Count Values excluding 0

if it contains word "sub" at start try this

Code:
=SUMPRODUCT(--(A1:A8<>0),--(NOT(LEFT(A1:A8,3)="sub")))
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

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