Countifs quesiton

tuktuk

Well-known Member
Joined
Nov 13, 2006
Messages
856
I have summary sheet that references values on a data sheet. if the data sheet if populated with a 0 the summary sheets cells show "-".

I want to count all cells that do not contain a "-" on the summary sheet for range ("G5:AD5")

What would the correct formula be for such scenario?

I appreciate it.

Tuk
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
=countif(g5:ad5,"<>-")

If it's just formatted to show the -, then:
=COUNTIF(G5:AD5,"<>0")
 
Last edited:
Upvote 0
If the range actually has zeros in them and the number formatting shows "-" then this should work
Code:
=COUNTIF(G5:AD5,"<>0")

If the range actually has "-" in it then this should work
Code:
=COUNTIF(G5:AD5,"<>-")
 
Upvote 0
gotcha.....what if is not a continuous range and individual cells. more specifically: CA5, CC5, CE5....etc?

using the "<>0") option
 
Last edited:
Upvote 0
Something like this:

=SUMPRODUCT(--(MOD(COLUMN(CA5:CZ5)-COLUMN(CA5),2)=0),--(CA5:CZ5<>0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

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