Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default How do I change the following formula to allow for leap year

I am using Excel 2000.

I have a spreadsheet that calculates the hours used in the last rolling 12
months for FMLA. The fomula I have works but I need to allow for leap years.
How do I change the formula?

The formula in column C is: =sumif($A$2:A2,""&A2-365,B$2:B2)

Col A Col B Col C
Date Hours used Hours in past 12 month period
1-1-07 1.00 1.00
2-15-07 5.00 6.00
2-5-08 3.00 8.00

Thanks for your help.
Linda

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 292
Default How do I change the following formula to allow for leap year

try
=sumif($A$2:A2,""&DATE(YEAR(A2)-1,MONTH(A2),DAY(A2)),B$2:B2)

HTH. Best wishes Harald

"Linda432" skrev i melding
...
I am using Excel 2000.

I have a spreadsheet that calculates the hours used in the last rolling 12
months for FMLA. The fomula I have works but I need to allow for leap
years.
How do I change the formula?

The formula in column C is: =sumif($A$2:A2,""&A2-365,B$2:B2)

Col A Col B Col C
Date Hours used Hours in past 12 month period
1-1-07 1.00 1.00
2-15-07 5.00 6.00
2-5-08 3.00 8.00

Thanks for your help.
Linda



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default How do I change the following formula to allow for leap year

You could use

=SUMIF($A$2:A2,""&DATEVALUE(MONTH(A2)&"/"&DAY(A2)&"/"&YEAR(A2)-1),B$2:B2)

Andrea Jones
www.stratatraining.co.uk
www.wrekinpublishing.com

"Linda432" wrote:

I am using Excel 2000.

I have a spreadsheet that calculates the hours used in the last rolling 12
months for FMLA. The fomula I have works but I need to allow for leap years.
How do I change the formula?

The formula in column C is: =sumif($A$2:A2,""&A2-365,B$2:B2)

Col A Col B Col C
Date Hours used Hours in past 12 month period
1-1-07 1.00 1.00
2-15-07 5.00 6.00
2-5-08 3.00 8.00

Thanks for your help.
Linda

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default How do I change the following formula to allow for leap year

Thank you both. The formulas worked like a charm!!

Linda

"Andrea Jones" wrote:

You could use

=SUMIF($A$2:A2,""&DATEVALUE(MONTH(A2)&"/"&DAY(A2)&"/"&YEAR(A2)-1),B$2:B2)

Andrea Jones
www.stratatraining.co.uk
www.wrekinpublishing.com

"Linda432" wrote:

I am using Excel 2000.

I have a spreadsheet that calculates the hours used in the last rolling 12
months for FMLA. The fomula I have works but I need to allow for leap years.
How do I change the formula?

The formula in column C is: =sumif($A$2:A2,""&A2-365,B$2:B2)

Col A Col B Col C
Date Hours used Hours in past 12 month period
1-1-07 1.00 1.00
2-15-07 5.00 6.00
2-5-08 3.00 8.00

Thanks for your help.
Linda

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
Leap Year Jet Excel Discussion (Misc queries) 3 March 20th 08 04:17 PM
leap year p-nut Excel Discussion (Misc queries) 5 January 10th 08 05:34 AM
Leap Year Ralph Page Charts and Charting in Excel 3 November 5th 07 01:57 AM
How to determine if year is a leap year Wanda Excel Worksheet Functions 7 September 17th 07 07:48 AM
Leap Year Blues Mike Excel Discussion (Misc queries) 2 March 10th 06 04:26 PM


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