Formula count number names in column excluding 0

bishop7262

Board Regular
Joined
Jan 9, 2010
Messages
87
I have a column with list of names but there are some zeros in that column. What is the formula to only count the names and exclude the zeros

example

Dave Myer
John Doe
Stacy Keach
0
0
0

Count should equal 3

thank you
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Jasonb75 "><" is much easier than mine, but i have also seen this used in similar situations. simply counting the common cell that you do not want and subtracting it from the total count. this only works when the data you do not want is always the same.

=COUNTA(A1:A7)-COUNTIF(A1:A7,"0")
 
Upvote 0
Jasonb75's "><" is much easier than mine, but i have also seen this used in similar situations. simply counting the common cell that you do not want and subtracting it from the total count. this only works when the data you do not want is always the same.

=COUNTA(A1:A7)-COUNTIF(A1:A7,"0")

Give a try to:

COUNTIF(A1:A7,"?*")

too.
 
Upvote 0
Try

=COUNTIF(A2:A7,"><")

Using >< instead of <> ignores all numeric values.
I've never seen that criteria before.

Check out these results:

Book1
ABCDE
1text1__16=COUNTIF(A1:A20,"?*")
2text2__3=COUNTIF(A1:A20,"><")
3text3___
40___
50___
6formula blank__
7formula blank__
8___
9???___
10*___
11/
12"
13)
14(
15&
16^
17%
18$
19#
20@
Sheet1

Seems as though it excludes all those "special" characters!

Maybe we can use that in data validation where one of the rules is no special characters are permitted?
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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