Calculating Days in a period
[Closed]
Report
SusanB

Trowa 
Trowa 
Related:
 Calculating Days in a period
 How can calculate days between twodates ✓  Forum  Excel
 Hotmail 30 day waiting period ✓  Forum  Hotmail/Outlook.com
 How to calculate 180 days from a date in excel  HowTo  Excel
 Calculate no of days left from today to a future specified date ✓  Forum  Excel
 How to calculate number of calender days ✓  Forum  Programming
1 reply
Trowa
Hi SusanB,
Aren't you forgetting about leap years?
You say it's 41 years and 181 days. If you don't consider leap years it's 41*365+181=15146. But a leap year has 366 days. Considering leap years will get you 15155 days.
Here is how you can determine if a year is a leaper or not:
1. If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
2. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
3. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
4. The year is a leap year (it has 366 days).
5. The year is not a leap year (it has 365 days).
Putting this info into a formula you will get:
I also want you to look at the following function: DATEDIF which can be very helpfull when determining days, months, and/or years between two dates.
This function is perfectly explained at the following location:
http://www.meadinkent.co.uk/xl_birthday.htm
Best regards,
Trowa
Aren't you forgetting about leap years?
You say it's 41 years and 181 days. If you don't consider leap years it's 41*365+181=15146. But a leap year has 366 days. Considering leap years will get you 15155 days.
Here is how you can determine if a year is a leaper or not:
1. If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
2. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
3. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
4. The year is a leap year (it has 366 days).
5. The year is not a leap year (it has 365 days).
Putting this info into a formula you will get:
=IF(OR(AND(REST(A1,4)=0,REST(A1,100)<>0),REST(A1,400)=0),"Leap Year","No Leap Year")So put your yearnumber in A1 and the formula will tell you if it's a leap year or not.
I also want you to look at the following function: DATEDIF which can be very helpfull when determining days, months, and/or years between two dates.
This function is perfectly explained at the following location:
http://www.meadinkent.co.uk/xl_birthday.htm
Best regards,
Trowa