# Excel

What Excel formula do I use, and how do I use it to do the following?: A column of say 150 lines with different percentages. These percentages range from 7 to 96. I need the spreadsheet to count how many cells have between 0 and 9, how many between 10 and 19, how many between 20 and 29 and so on. I tried =DCOUNTA but when I put in <10 it gives an invalid error back.

=COUNTIF(range;">=0")-COUNTIF(range;">=10")
=COUNTIF(range;">=10")-COUNTIF(range;">=20")
=COUNTIF(range;">=20")-COUNTIF(range;">=30")

etc, etc. where range is your column of data, say \$C\$5:\$C\$155

Thanks

Tried that, but it gives the wrong value. Should it not be something like =COUNTIF(A2:A22,">=0"&"<=9") ? Needless to say, my effort also does not work.

In what way is it wrong? Do you want the border values (0, 10, 20, 30, etc ) excluded from the count, or included in the upper count)?

Also, are you sure that you’ve used a semicolon and not a comma between the range and the criterion? I.e. =COUNTIF(range;">=0")-COUNTIF(range;">=10")

The COUNTIF function allows only one criterion at a time so I doubt =COUNTIF(A2:A22;">=0"&"<=9") will work.

Here is a file you can download and open with Excel. It should illustrate things a bit better: