Thread: CountIf
View Single Post
  #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