Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Column A = dates...the date an employee worked
Column B = numbers....the hours an employee worked overtime I have 70 employees / worksheets. I've been asked to find the total hours worked for each employee for the 1st half and 2nd half of the year. Then determine weather more hours were worked the 1st or 2nd half of the year. I am thinking I should use 2 IF/Then statements If 12/31/07 < A1 7/1/08, then add B1 If 6/30/08 < A1 1/1/09, then add B1 Entries in Column will not exceed 100 per worksheet A1:A100. Your help greatly appreciated. Jerry |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
To calculate the sum for the first half of the year, use
=SUMPRODUCT((A1:A100DATE(YEAR(NOW())-1,12,31))*(A1:A100<DATE(YEAR(NOW()),7,1))*B1:B100) To calculate the sum for the second half of the year, use =SUMPRODUCT((A1:A100=DATE(YEAR(NOW()),7,1))*B1:B1 00) Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Fri, 12 Dec 2008 12:42:01 -0800, Jerry L wrote: Column A = dates...the date an employee worked Column B = numbers....the hours an employee worked overtime I have 70 employees / worksheets. I've been asked to find the total hours worked for each employee for the 1st half and 2nd half of the year. Then determine weather more hours were worked the 1st or 2nd half of the year. I am thinking I should use 2 IF/Then statements If 12/31/07 < A1 7/1/08, then add B1 If 6/30/08 < A1 1/1/09, then add B1 Entries in Column will not exceed 100 per worksheet A1:A100. Your help greatly appreciated. Jerry |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
FANTASTIC !!
Chip you saved me hours of work. Thanks, Jerry "Chip Pearson" wrote: To calculate the sum for the first half of the year, use =SUMPRODUCT((A1:A100DATE(YEAR(NOW())-1,12,31))*(A1:A100<DATE(YEAR(NOW()),7,1))*B1:B100) To calculate the sum for the second half of the year, use =SUMPRODUCT((A1:A100=DATE(YEAR(NOW()),7,1))*B1:B1 00) Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Fri, 12 Dec 2008 12:42:01 -0800, Jerry L wrote: Column A = dates...the date an employee worked Column B = numbers....the hours an employee worked overtime I have 70 employees / worksheets. I've been asked to find the total hours worked for each employee for the 1st half and 2nd half of the year. Then determine weather more hours were worked the 1st or 2nd half of the year. I am thinking I should use 2 IF/Then statements If 12/31/07 < A1 7/1/08, then add B1 If 6/30/08 < A1 1/1/09, then add B1 Entries in Column will not exceed 100 per worksheet A1:A100. Your help greatly appreciated. Jerry |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Jerry L wrote:
Column A = dates...the date an employee worked Column B = numbers....the hours an employee worked overtime I have 70 employees / worksheets. I've been asked to find the total hours worked for each employee for the 1st half and 2nd half of the year. Then determine weather more hours were worked the 1st or 2nd half of the year. I am thinking I should use 2 IF/Then statements If 12/31/07 < A1 7/1/08, then add B1 If 6/30/08 < A1 1/1/09, then add B1 Entries in Column will not exceed 100 per worksheet A1:A100. Your help greatly appreciated. Jerry First half: =SUMPRODUCT((YEAR(A1:A100)=2008)*(MONTH(A1:A100)<7 )*(B1:B100)) Second half: =SUMPRODUCT((YEAR(A1:A100)=2008)*(MONTH(A1:A100)6 )*(B1:B100)) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Only Half of First Bar is Showing | Charts and Charting in Excel | |||
Half width | Charts and Charting in Excel | |||
print half of rows on left and other half on right | Excel Discussion (Misc queries) | |||
Finding the value over half of another value. | Excel Discussion (Misc queries) | |||
Countif that can i half | Excel Discussion (Misc queries) |