Ok let's try this work around! ... Count if

Ultimate Selector

Board Regular
Joined
Dec 15, 2013
Messages
153
I want to count the cells that have either a number 1, 2 or 3 in it. how can I combine all three of these numbers into one statement (formula?)

I Don't want to Sum what numbers are in the cells...
I just want to count them.

It's conting my cells that have a zero in them as well. How do I omit counting the cells with Zero in the formula?

=COUNTIF(AC8:AU8,"=1") ... =COUNTIF(AC8:AU8,"=2") ... =COUNTIF(AC8:AU8,"=3")

I tried this but to no avail ... =COUNTIF(AC8:AU8,"<4")

Thanks in advance,
U S
 
Last edited:

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Saba Sabaratnam

Board Regular
Joined
May 26, 2018
Messages
196
you can use the following formula to count them.

1613449479677.png


Enter the formula in C4

=SUM(COUNTIFS(A1:A17,C1:C3))

Kind regards

Saba
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Pretty much the same, hard coded:

Book3.xlsx
ABC
106
21
35
49
52
63
70
82
93
106
111
127
Sheet764
Cell Formulas
RangeFormula
C1C1=SUM(COUNTIF(A1:A20,{1,2,3}))
 
Solution

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,656
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
=COUNTIFS(A1:A17,"<"&4) or =COUNTIFS(A1:A17,"<4")
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
<4 would include 0 or variations thereof...

EDIT: You're welcome.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,587
Messages
5,637,248
Members
416,963
Latest member
samfuge

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
Top