Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matt
 
Posts: n/a
Default Countif Function with and Statement

I am trying to count the occourances in a row of data that are between $20 &
$25. Based on postings I have tried a couple of options...both are resulting
in "0".

=COUNTIF(F4:AK4,"and(F4:AK420,F4:AK4<25)")
=SUMPRODUCT(--(F3:AK3="20"),--(F3:AK3="<25"))
Any Ideas??
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

=COUNTIF(F4:AK4,"20")-COUNTIF(F4:AK4,"=25")

or


=SUMPRODUCT(--(F3:AK320),--(F3:AK3<25))


note that this will not include 20 or 25,
if so use

=COUNTIF(F4:AK4,"=20")-COUNTIF(F4:AK4,"25")


or

=SUMPRODUCT(--(F3:AK3=20),--(F3:AK3<=25))

--

Regards,

Peo Sjoblom

"Matt" wrote in message
...
I am trying to count the occourances in a row of data that are between $20

&
$25. Based on postings I have tried a couple of options...both are

resulting
in "0".

=COUNTIF(F4:AK4,"and(F4:AK420,F4:AK4<25)")
=SUMPRODUCT(--(F3:AK3="20"),--(F3:AK3="<25"))
Any Ideas??



  #3   Report Post  
Matt Cromer
 
Posts: n/a
Default

Peo -
Thank you...
I modified your last formula to include 20, but not include 25. See below

=SUMPRODUCT(--(F3:AK3=20),--(F3:AK3<25))
Works fine, Thanks again

Matt

"Peo Sjoblom" wrote:

=COUNTIF(F4:AK4,"20")-COUNTIF(F4:AK4,"=25")

or


=SUMPRODUCT(--(F3:AK320),--(F3:AK3<25))


note that this will not include 20 or 25,
if so use

=COUNTIF(F4:AK4,"=20")-COUNTIF(F4:AK4,"25")


or

=SUMPRODUCT(--(F3:AK3=20),--(F3:AK3<=25))

--

Regards,

Peo Sjoblom

"Matt" wrote in message
...
I am trying to count the occourances in a row of data that are between $20

&
$25. Based on postings I have tried a couple of options...both are

resulting
in "0".

=COUNTIF(F4:AK4,"and(F4:AK420,F4:AK4<25)")
=SUMPRODUCT(--(F3:AK3="20"),--(F3:AK3="<25"))
Any Ideas??




  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Thanks for the feedback Matt

--

Regards,

Peo Sjoblom

"Matt Cromer" wrote in message
...
Peo -
Thank you...
I modified your last formula to include 20, but not include 25. See below

=SUMPRODUCT(--(F3:AK3=20),--(F3:AK3<25))
Works fine, Thanks again

Matt

"Peo Sjoblom" wrote:

=COUNTIF(F4:AK4,"20")-COUNTIF(F4:AK4,"=25")

or


=SUMPRODUCT(--(F3:AK320),--(F3:AK3<25))


note that this will not include 20 or 25,
if so use

=COUNTIF(F4:AK4,"=20")-COUNTIF(F4:AK4,"25")


or

=SUMPRODUCT(--(F3:AK3=20),--(F3:AK3<=25))

--

Regards,

Peo Sjoblom

"Matt" wrote in message
...
I am trying to count the occourances in a row of data that are between

$20
&
$25. Based on postings I have tried a couple of options...both are

resulting
in "0".

=COUNTIF(F4:AK4,"and(F4:AK420,F4:AK4<25)")
=SUMPRODUCT(--(F3:AK3="20"),--(F3:AK3="<25"))
Any Ideas??






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



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