Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Using AND + COUNTIF to filter / count totals

Hello! I'm writing a couple of formulas to track employee statistics. I
have my data set up as follows: Col.A is date, Col.D is "yes" or "no". These
are the only two columns with critical data. My summary/calculation area is
to the right of the populated columns. Col.F has a list of months (Nov-06,
Dec-06, so on...these are entered as 11-1-06, 12-1-06....but formatted to
display as Nov-06...). Col.G has a formula to count entries per month (or
leave blank if no entries):

=IF((COUNTIF($A$4:$A$200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7))0,(COUNTIF($A$4:$A$ 200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7)),"")

This works OK. Col.H will be "total correct" per month, using the yes or no
in Col.D to get a total for that month which are correct (a "yes" entry in
col.D). I've been trying to combine COUNTIF and AND, but no luck. Any
ideas? THANKS!!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Using AND + COUNTIF to filter / count totals

I just responded to your post in the Access newsgroup. Use SUMPRODUCT.
--
Brevity is the soul of wit.


"ClintG" wrote:

Hello! I'm writing a couple of formulas to track employee statistics. I
have my data set up as follows: Col.A is date, Col.D is "yes" or "no". These
are the only two columns with critical data. My summary/calculation area is
to the right of the populated columns. Col.F has a list of months (Nov-06,
Dec-06, so on...these are entered as 11-1-06, 12-1-06....but formatted to
display as Nov-06...). Col.G has a formula to count entries per month (or
leave blank if no entries):

=IF((COUNTIF($A$4:$A$200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7))0,(COUNTIF($A$4:$A$ 200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7)),"")

This works OK. Col.H will be "total correct" per month, using the yes or no
in Col.D to get a total for that month which are correct (a "yes" entry in
col.D). I've been trying to combine COUNTIF and AND, but no luck. Any
ideas? THANKS!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 196
Default Using AND + COUNTIF to filter / count totals

Hi Clint

You can make use of Sumproduct (this way you don't need 2 month values
either, just the one will do):

=SUMPRODUCT(--(TEXT($A$4:$A$200,"mmmyyyy")=TEXT($F6,"mmmyyyy")),--($D$4:$D$200="Yes"))

the above will count the number of Yes's in column D for the given
month as shown in F6. The "Yes" can obviously be a cell reference
instead holding the value "Yes" (or "no" as required).

Hope this helps!

Richard


ClintG wrote:

Hello! I'm writing a couple of formulas to track employee statistics. I
have my data set up as follows: Col.A is date, Col.D is "yes" or "no". These
are the only two columns with critical data. My summary/calculation area is
to the right of the populated columns. Col.F has a list of months (Nov-06,
Dec-06, so on...these are entered as 11-1-06, 12-1-06....but formatted to
display as Nov-06...). Col.G has a formula to count entries per month (or
leave blank if no entries):

=IF((COUNTIF($A$4:$A$200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7))0,(COUNTIF($A$4:$A$ 200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7)),"")

This works OK. Col.H will be "total correct" per month, using the yes or no
in Col.D to get a total for that month which are correct (a "yes" entry in
col.D). I've been trying to combine COUNTIF and AND, but no luck. Any
ideas? THANKS!!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Using AND + COUNTIF to filter / count totals

Thanks Dave! I appreciate your help.

"Dave F" wrote:

I just responded to your post in the Access newsgroup. Use SUMPRODUCT.
--
Brevity is the soul of wit.


"ClintG" wrote:

Hello! I'm writing a couple of formulas to track employee statistics. I
have my data set up as follows: Col.A is date, Col.D is "yes" or "no". These
are the only two columns with critical data. My summary/calculation area is
to the right of the populated columns. Col.F has a list of months (Nov-06,
Dec-06, so on...these are entered as 11-1-06, 12-1-06....but formatted to
display as Nov-06...). Col.G has a formula to count entries per month (or
leave blank if no entries):

=IF((COUNTIF($A$4:$A$200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7))0,(COUNTIF($A$4:$A$ 200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7)),"")

This works OK. Col.H will be "total correct" per month, using the yes or no
in Col.D to get a total for that month which are correct (a "yes" entry in
col.D). I've been trying to combine COUNTIF and AND, but no luck. Any
ideas? THANKS!!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Using AND + COUNTIF to filter / count totals

Thanks Richard! Works like a charm!

"RichardSchollar" wrote:

Hi Clint

You can make use of Sumproduct (this way you don't need 2 month values
either, just the one will do):

=SUMPRODUCT(--(TEXT($A$4:$A$200,"mmmyyyy")=TEXT($F6,"mmmyyyy")),--($D$4:$D$200="Yes"))

the above will count the number of Yes's in column D for the given
month as shown in F6. The "Yes" can obviously be a cell reference
instead holding the value "Yes" (or "no" as required).

Hope this helps!

Richard


ClintG wrote:

Hello! I'm writing a couple of formulas to track employee statistics. I
have my data set up as follows: Col.A is date, Col.D is "yes" or "no". These
are the only two columns with critical data. My summary/calculation area is
to the right of the populated columns. Col.F has a list of months (Nov-06,
Dec-06, so on...these are entered as 11-1-06, 12-1-06....but formatted to
display as Nov-06...). Col.G has a formula to count entries per month (or
leave blank if no entries):

=IF((COUNTIF($A$4:$A$200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7))0,(COUNTIF($A$4:$A$ 200,"="&F6))-(COUNTIF($A$4:$A$200,"="&F7)),"")

This works OK. Col.H will be "total correct" per month, using the yes or no
in Col.D to get a total for that month which are correct (a "yes" entry in
col.D). I've been trying to combine COUNTIF and AND, but no luck. Any
ideas? 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



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