# How can i count a range of cells ??

#### toyo2

##### New Member
I try CountIF(g4:g229,And(">100","<220") this on dont work help plz

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Welcome to the board.

Which version of XL do you have?
If you have XL2007+ you can use COUNTIFS

=COUNTIFS(Q4:Q229,">100",Q4:Q229,"<220")

In XL2003 or earlier, you need sumproduct

=SUMPRODUCT(--(Q4:Q229>100),--(Q4:Q229<220))

=countifs(g4:g229,">100",g4:g229,"<220")

Maybe this (not 100% sure whether you need < or <= for either COUNTIF function call... it depends if you need to count or exclude the boundary numbers... your post shows you excluding them so that is what I set up my formula to do...

=COUNTIF(G4:G229,"<200")-COUNTIF(G4:G229,"<=100")

Thank you all good people

You're welcome.

I try CountIF(g4:g229,And(">100","<220") this on dont work help plz

If you don't have CountIfs...

=COUNTIF(G4:G229,">100")-COUNTIF(G4:G229,">=220")

Replies
6
Views
132
Replies
5
Views
176
Replies
20
Views
343
Replies
3
Views
146
Replies
5
Views
115

1,196,057
Messages
6,013,159
Members
441,751
Latest member
336448

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