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

#### Ultimate Selector

##### Board Regular
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")

U S

Last edited:

### Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

#### Saba Sabaratnam

##### Board Regular
you can use the following formula to count them.

Enter the formula in C4

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

Kind regards

Saba

#### jtakw

##### Well-known Member
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}))

#### Dave Patton

##### Well-known Member
=COUNTIFS(A1:A17,"<"&4) or =COUNTIFS(A1:A17,"<4")

#### Ultimate Selector

##### Board Regular
Thanks fellas that worked well for me! Much Appreciated for your input!

Have a Great Nite!

Regards,
US

#### jtakw

##### Well-known Member
<4 would include 0 or variations thereof...

EDIT: You're welcome.

Replies
7
Views
164
Replies
4
Views
180
Replies
6
Views
471
Replies
7
Views
162
Replies
8
Views
163

1,128,106
Messages
5,628,713
Members
416,333
Latest member
Time2Learn

### 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.

### Which adblocker are you using?

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

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