Hello Excel Forum.
Can anyone tell me the formula to put in Cell D1 that will state how many cells,when I apply my filters, are greater than zero?
Attached example enclosed - with the desired filters applied already.
The count in the filtered list is 10. But I want the count only where the value in the cell is greater than zero. In this example, the correct answer is 9, because there is a cell that is zero and I want to ignore the zero cells.
Have tried every possible combination of functions (sumproduct/countif) but this is really beating me hands down.
Many thanks
denise
London
Last edited by denise001; 09-01-2011 at 11:27 AM.
Try:
=SUMPRODUCT(SUBTOTAL(3,OFFSET($D$3:$D$50,ROW($D$3:$D$50)-MIN(ROW($D$3:$D$50)),,1)),--($D$3:$D$50>0))
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Assuming you are using 2007 or later this might do what you need witout filtering.
Select from the drop-downs in B1 & C1
In D1
=COUNTIFS(B3:B51,B1,C3:C51,C1,D3:D51,">0")
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
Perfect NBVC! Works perfectly. Thank you very much.
With a formula that long, I would have never got it - but I am pleased to say I did get close, as one of my attempts did include MIN(ROW). So thank you for your help. Appreciate your time.
Quite a tricky one I thought!
Thread set to SOLVED.
Warm regards
denise
Hello Marcol
Thank you so much for your solution. Appreciate your time on my behalf. Like your solution. I have saved this and NBVC solution. I will be using NBVC solutionthis time around.
Quite a tricky problem initially I thought!
best regards
denise
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks