#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default COUNTIF

Can anyone tell me what I'm doing wrong in this formula?

-2
-1
0
1
2
3
4
5
6

=COUNTIF(A1:A9,"=0"&"<5")
I looked at the help section and it seemed to suggest you use '&' when you
have two criteria, is this where I'm going wrong? The answer should be 5,
but it returns 0. I'm looking to find those numbers above zero and below
five.

Thanx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default COUNTIF

=SUMPRODUCT(--(A1:A9=0),--(A1:A9<5))

--
Gary''s Student - gsnu200756
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default COUNTIF

Another way is to use 2 COUNTIFs

Going by your attempt below
(disregarding your description which was a little off):
=COUNTIF(A1:A9,"=0"&"<5")


You could also use:
=COUNTIF(A1:A9,"=0")-COUNTIF(A1:A9,"=5")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"littlejess22" wrote:
Can anyone tell me what I'm doing wrong in this formula?

-2
-1
0
1
2
3
4
5
6

=COUNTIF(A1:A9,"=0"&"<5")
I looked at the help section and it seemed to suggest you use '&' when you
have two criteria, is this where I'm going wrong? The answer should be 5,
but it returns 0. I'm looking to find those numbers above zero and below
five.

Thanx

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
countif maryj Excel Worksheet Functions 1 April 14th 05 11:44 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"