Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Zachary Baker
 
Posts: n/a
Default Sum of Hours Per Month

I have been given a data set which contains work hours and dates in the form
of mm/dd/yy. I am trying to sum all the hours worked in each month. A
co-worker suggested I use sumproduct but I'm still not able to achieve the
process. Additionally, the data crosses over years, so I am not quite sure
how to create a fomula that takes the year into account. Any help would be
great. Thanks much.

--
Zachary Baker
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Bernie Deitrick
 
Posts: n/a
Default Sum of Hours Per Month

Zachary,

For example, to get the values for January of this year, with dates in column A and hours in B:

=SUMPRODUCT((A1:A2000=DATE(2006,1,1))*(A1:A2000<D ATE(2006,2,1))*B1:B2000)

Easier would be a pivot table, with the data grouped based on months.

HTH,
Bernie
MS Excel MVP


"Zachary Baker" <Zachary wrote in message
...
I have been given a data set which contains work hours and dates in the form
of mm/dd/yy. I am trying to sum all the hours worked in each month. A
co-worker suggested I use sumproduct but I'm still not able to achieve the
process. Additionally, the data crosses over years, so I am not quite sure
how to create a fomula that takes the year into account. Any help would be
great. Thanks much.

--
Zachary Baker



  #4   Report Post  
Posted to microsoft.public.excel.newusers
bpeltzer
 
Posts: n/a
Default Sum of Hours Per Month

I'll suppose you have a date in column A and hours in column B.
To calculate the hours worked in May '06:
=sumif(a:a,"="&date(2006,5,1),b:b)-sumif(a:a,"="&date(2006,6,1),b:b)
The first part adds all hours worked on/after May 1 '06; the second part
subtracts out all hours worked on/after June 1 '06, leaving only those worked
during the month of May '06.

"Zachary Baker" wrote:

I have been given a data set which contains work hours and dates in the form
of mm/dd/yy. I am trying to sum all the hours worked in each month. A
co-worker suggested I use sumproduct but I'm still not able to achieve the
process. Additionally, the data crosses over years, so I am not quite sure
how to create a fomula that takes the year into account. Any help would be
great. Thanks much.

--
Zachary Baker

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 convert hours and minutes to hours and tenths. MikeC Excel Discussion (Misc queries) 2 February 9th 06 06:22 PM
Can this adjusted GPA formual be accomplised? Chris Cred via OfficeKB.com Excel Discussion (Misc queries) 1 January 19th 06 01:59 PM
adding rows of hours and minutes to get a total Tipps Excel Worksheet Functions 1 November 4th 05 07:03 PM
Subtracting paid hours from unpaid hours ejerry7 Excel Worksheet Functions 5 November 29th 04 04:16 AM
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 09:28 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"