Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Compare 1st Half & 2nd Half of 2008.

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default Compare 1st Half & 2nd Half of 2008.

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Compare 1st Half & 2nd Half of 2008.

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Compare 1st Half & 2nd Half of 2008.

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
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
Only Half of First Bar is Showing klam Charts and Charting in Excel 3 April 22nd 23 02:08 AM
Half width Mauro Charts and Charting in Excel 2 April 3rd 08 04:33 AM
print half of rows on left and other half on right Steve B. Excel Discussion (Misc queries) 2 November 16th 07 11:20 AM
Finding the value over half of another value. Neil Excel Discussion (Misc queries) 9 September 14th 07 12:35 PM
Countif that can i half Joel Excel Discussion (Misc queries) 1 January 5th 06 08:18 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"