#1   Report Post  
Posted to microsoft.public.excel.misc
Eze Eze is offline
external usenet poster
 
Posts: 2
Default CountIf

Hi,
Does anyone knows how can I use CountIf with two criteria conditions. For
example if I want to Count numbers with the following criteria: =40 and <45.
What shall I write in the criteria field
I tried using & or and in the criteria field but it didn't work
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default CountIf

One way:

=COUNTIF(A1:A100,"=40") - COUNTIF(A1:A100,"=45")

another:

=SUMPRODUCT(--(A1:A100=40),--(A1:A100<45))

In article ,
Eze wrote:

Hi,
Does anyone knows how can I use CountIf with two criteria conditions. For
example if I want to Count numbers with the following criteria: =40 and <45.
What shall I write in the criteria field
I tried using & or and in the criteria field but it didn't work
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
Eze Eze is offline
external usenet poster
 
Posts: 2
Default CountIf

thanks. This helped me but I thought that there was a way to write both
conditions in the same line, for example =COUNTIF(A1:A100,"=40&<45") but it
seems that there is not


"JE McGimpsey" wrote:

One way:

=COUNTIF(A1:A100,"=40") - COUNTIF(A1:A100,"=45")

another:

=SUMPRODUCT(--(A1:A100=40),--(A1:A100<45))

In article ,
Eze wrote:

Hi,
Does anyone knows how can I use CountIf with two criteria conditions. For
example if I want to Count numbers with the following criteria: =40 and <45.
What shall I write in the criteria field
I tried using & or and in the criteria field but it didn't work
Thanks


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
COUNTIF cestbarb Excel Discussion (Misc queries) 9 March 31st 06 09:18 AM
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 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 03:30 AM.

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

About Us

"It's about Microsoft Excel"