Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ray
 
Posts: n/a
Default coutif with 3 criteria including brackets

Hello

I try to to use 3 critéria in a formula with the Countif function. Actually
two of them represent a bracket.
For the calcul of the bracket I found the good result by using :
=countif(E4:E2337;"<=2")-countif(E4:E2337;"<=5")
where I am in trouble is when I try to add the third criterion in my formula
=countif(D4:D2337;"yes")
I tried those math operators but none of them works +, -, *

Do you have an idea ?
Thanks
Ray


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Ray,

I am not quite sure what you were doing, but is this what you want


=SUMPRODUCT(--(E4:E2337=2);--(E4:E2337<=5);--(D4:D2337="yes"))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ray" wrote in message
...
Hello

I try to to use 3 critéria in a formula with the Countif function.

Actually
two of them represent a bracket.
For the calcul of the bracket I found the good result by using :
=countif(E4:E2337;"<=2")-countif(E4:E2337;"<=5")
where I am in trouble is when I try to add the third criterion in my

formula
=countif(D4:D2337;"yes")
I tried those math operators but none of them works +, -, *

Do you have an idea ?
Thanks
Ray




  #5   Report Post  
Lewis Clark
 
Posts: n/a
Default

The tests in the parentheses return TRUE or FALSE. The "--" makes Excel
turn true/false into 1/0, which allows doing the math.

"Ray" wrote in message
...
Hello Bob
I have just tried this formula and it works fine
Thank you very much.
But I still don't see why you use the "--" in the formula
Thanks in deed
Ray

"Ray" a écrit dans le message de news:
...
Thanks for your answer Bob,
I am going to try this formula right away .
One thing, I don't understand why you used the "--" in the formula.
Could you tell me please ,
Thanks




"Bob Phillips" a écrit dans le
message de news: ...
Ray,

I am not quite sure what you were doing, but is this what you want


=SUMPRODUCT(--(E4:E2337=2);--(E4:E2337<=5);--(D4:D2337="yes"))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ray" wrote in message
...
Hello

I try to to use 3 critéria in a formula with the Countif function.
Actually
two of them represent a bracket.
For the calcul of the bracket I found the good result by using :
=countif(E4:E2337;"<=2")-countif(E4:E2337;"<=5")
where I am in trouble is when I try to add the third criterion in my
formula
=countif(D4:D2337;"yes")
I tried those math operators but none of them works +, -, *

Do you have an idea ?
Thanks
Ray












  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

See http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ray" wrote in message
...
Hello Bob
I have just tried this formula and it works fine
Thank you very much.
But I still don't see why you use the "--" in the formula
Thanks in deed
Ray

"Ray" a écrit dans le message de news:
...
Thanks for your answer Bob,
I am going to try this formula right away .
One thing, I don't understand why you used the "--" in the formula.
Could you tell me please ,
Thanks




"Bob Phillips" a écrit dans le

message
de news: ...
Ray,

I am not quite sure what you were doing, but is this what you want


=SUMPRODUCT(--(E4:E2337=2);--(E4:E2337<=5);--(D4:D2337="yes"))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ray" wrote in message
...
Hello

I try to to use 3 critéria in a formula with the Countif function.
Actually
two of them represent a bracket.
For the calcul of the bracket I found the good result by using :
=countif(E4:E2337;"<=2")-countif(E4:E2337;"<=5")
where I am in trouble is when I try to add the third criterion in my
formula
=countif(D4:D2337;"yes")
I tried those math operators but none of them works +, -, *

Do you have an idea ?
Thanks
Ray










  #7   Report Post  
Ray
 
Posts: n/a
Default

Thanks for this explaination Lewis
Ray
"Lewis Clark" <lewis_clark_644 @ yahoo.com a écrit dans le message de news:
8xEOe.5357$Hi.951@trnddc04...
The tests in the parentheses return TRUE or FALSE. The "--" makes Excel
turn true/false into 1/0, which allows doing the math.

"Ray" wrote in message
...
Hello Bob
I have just tried this formula and it works fine
Thank you very much.
But I still don't see why you use the "--" in the formula
Thanks in deed
Ray

"Ray" a écrit dans le message de news:
...
Thanks for your answer Bob,
I am going to try this formula right away .
One thing, I don't understand why you used the "--" in the formula.
Could you tell me please ,
Thanks




"Bob Phillips" a écrit dans le
message de news: ...
Ray,

I am not quite sure what you were doing, but is this what you want


=SUMPRODUCT(--(E4:E2337=2);--(E4:E2337<=5);--(D4:D2337="yes"))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ray" wrote in message
...
Hello

I try to to use 3 critéria in a formula with the Countif function.
Actually
two of them represent a bracket.
For the calcul of the bracket I found the good result by using :
=countif(E4:E2337;"<=2")-countif(E4:E2337;"<=5")
where I am in trouble is when I try to add the third criterion in my
formula
=countif(D4:D2337;"yes")
I tried those math operators but none of them works +, -, *

Do you have an idea ?
Thanks
Ray












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
Find largest alphanumeric value matching alpha criteria in databas Alison Excel Worksheet Functions 7 August 4th 05 06:59 PM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
Can I get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
Extracting a value from between brackets James Excel Discussion (Misc queries) 3 February 5th 05 02:28 AM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM


All times are GMT +1. The time now is 06:18 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"