Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default counting Ps and Ls based on the date in another row.

one more problem. I have dates running from 1/1/2007 to
29/6/2007 from C2 to EB2 and I have attendance as either P or L in the row
14 (C14 to EB14). Now I want to count all the Ps in a month. I want the
formula to look for month 1 in row 2 and then count Ps in row 14.

Also I would need to add the count of both Ls and Ps for some other purpose.

Thanks
Gary


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default counting Ps and Ls based on the date in another row.

Try this:

I'm assuming there are no empty cells within your date range on row 2. An
empty cell will evaluate as month 1.

=SUMPRODUCT((MONTH(C2:EB2)=1)*(C14:EB14="P"))

To count both "P" and "L":

=SUMPRODUCT((MONTH(C2:EB2)=1)*(C14:EB14={"P";"L"}) )

Biff

"Gary" wrote in message
...
one more problem. I have dates running from 1/1/2007 to
29/6/2007 from C2 to EB2 and I have attendance as either P or L in the row
14 (C14 to EB14). Now I want to count all the Ps in a month. I want the
formula to look for month 1 in row 2 and then count Ps in row 14.

Also I would need to add the count of both Ls and Ps for some other
purpose.

Thanks
Gary



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default counting Ps and Ls based on the date in another row.

TRY:

=sumproduct(--(month(c2:eb2)=1),--(c14:eb14="P"))

hth

"Gary" wrote:

one more problem. I have dates running from 1/1/2007 to
29/6/2007 from C2 to EB2 and I have attendance as either P or L in the row
14 (C14 to EB14). Now I want to count all the Ps in a month. I want the
formula to look for month 1 in row 2 and then count Ps in row 14.

Also I would need to add the count of both Ls and Ps for some other purpose.

Thanks
Gary



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
Need to create formula based on date Gary''s Student New Users to Excel 0 November 29th 06 11:32 PM
Need to create formula based on date Eileen New Users to Excel 0 November 29th 06 10:39 PM
Isolating single row based on date comparison [email protected] Excel Worksheet Functions 3 October 25th 06 05:42 PM
How to find the most recent date in a column based on other column Veretax Excel Worksheet Functions 7 October 18th 06 05:01 PM
Conditional formatting based on date range RGB Excel Discussion (Misc queries) 3 May 23rd 06 05:37 PM


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