Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default Count hours per month

Hi All

I have a spreadsheet where i need to count the number of hours and minutes
spent working on products per month

In cell range 'H' i have the time spent working i.e. 00:40 (40 minutes)

In cell range 'P' i have the dates i.e. 15/09/07

How do i calculate how many hours and minutes were spent working on products
during Jan,Feb,Apr etc?

I have tried this formula, but it only works for some months (works in
January, but not in September)

=SUMPRODUCT(--(TEXT('With costs'!P2:P5000,"mm yyyy")="08 2007"),--('With
costs'!H2:H5000))

Many thanks

Derek
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Count hours per month

You could try this:

put the numbers 1 to 12 in cells X1:X12, then in Z1 enter this
formula:

=SUMPRODUCT((MONTH('With costs'!P$2:P$5000)=X1)*('With costs'!H$2:H
$5000))

and copy the formula down into Z2:Z12. If you want to distinguish
between different years then put 2007 in Y1:Y12 and amend the formula
to:

=SUMPRODUCT((MONTH('With costs'!P$2:P$5000)=X1)*(YEAR('With costs'!P
$2:P$5000)=Y1)*('With costs'!H$2:H$5000))

and copy down.

Hope this helps.

Pete

On Sep 19, 10:08 am, Derek wrote:
Hi All

I have a spreadsheet where i need to count the number of hours and minutes
spent working on products per month

In cell range 'H' i have the time spent working i.e. 00:40 (40 minutes)

In cell range 'P' i have the dates i.e. 15/09/07

How do i calculate how many hours and minutes were spent working on products
during Jan,Feb,Apr etc?

I have tried this formula, but it only works for some months (works in
January, but not in September)

=SUMPRODUCT(--(TEXT('With costs'!P2:P5000,"mm yyyy")="08 2007"),--('With
costs'!H2:H5000))

Many thanks

Derek



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default Count hours per month

Thank you Pete, ill try that

"Pete_UK" wrote:

You could try this:

put the numbers 1 to 12 in cells X1:X12, then in Z1 enter this
formula:

=SUMPRODUCT((MONTH('With costs'!P$2:P$5000)=X1)*('With costs'!H$2:H
$5000))

and copy the formula down into Z2:Z12. If you want to distinguish
between different years then put 2007 in Y1:Y12 and amend the formula
to:

=SUMPRODUCT((MONTH('With costs'!P$2:P$5000)=X1)*(YEAR('With costs'!P
$2:P$5000)=Y1)*('With costs'!H$2:H$5000))

and copy down.

Hope this helps.

Pete

On Sep 19, 10:08 am, Derek wrote:
Hi All

I have a spreadsheet where i need to count the number of hours and minutes
spent working on products per month

In cell range 'H' i have the time spent working i.e. 00:40 (40 minutes)

In cell range 'P' i have the dates i.e. 15/09/07

How do i calculate how many hours and minutes were spent working on products
during Jan,Feb,Apr etc?

I have tried this formula, but it only works for some months (works in
January, but not in September)

=SUMPRODUCT(--(TEXT('With costs'!P2:P5000,"mm yyyy")="08 2007"),--('With
costs'!H2:H5000))

Many thanks

Derek




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Count hours per month

You're welcome, Derek - hope it works for you.

Pete

On Sep 19, 10:44 am, Derek wrote:
Thank you Pete, ill try that



"Pete_UK" wrote:
You could try this:


put the numbers 1 to 12 in cells X1:X12, then in Z1 enter this
formula:


=SUMPRODUCT((MONTH('With costs'!P$2:P$5000)=X1)*('With costs'!H$2:H
$5000))


and copy the formula down into Z2:Z12. If you want to distinguish
between different years then put 2007 in Y1:Y12 and amend the formula
to:


=SUMPRODUCT((MONTH('With costs'!P$2:P$5000)=X1)*(YEAR('With costs'!P
$2:P$5000)=Y1)*('With costs'!H$2:H$5000))


and copy down.


Hope this helps.


Pete


On Sep 19, 10:08 am, Derek wrote:
Hi All


I have a spreadsheet where i need to count the number of hours and minutes
spent working on products per month


In cell range 'H' i have the time spent working i.e. 00:40 (40 minutes)


In cell range 'P' i have the dates i.e. 15/09/07


How do i calculate how many hours and minutes were spent working on products
during Jan,Feb,Apr etc?


I have tried this formula, but it only works for some months (works in
January, but not in September)


=SUMPRODUCT(--(TEXT('With costs'!P2:P5000,"mm yyyy")="08 2007"),--('With
costs'!H2:H5000))


Many thanks


Derek- Hide quoted text -


- Show quoted text -



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
Sum of Hours Per Month Zachary Baker New Users to Excel 3 June 28th 06 04:20 PM
How can I count hours & minutes??!! jamespickett23 Excel Discussion (Misc queries) 2 October 18th 05 11:10 AM
count TIME that is GREATER than 24 hours JonPilot Excel Worksheet Functions 1 January 31st 05 10:55 PM
Add up the hours for each month ~Jeff~ Excel Worksheet Functions 2 November 11th 04 01:35 PM


All times are GMT +1. The time now is 05:12 PM.

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"