Help, please,
http://www.pttbn.com/images/we.png
My biggest problem is how to add and subtract days, months and years in columns E23:E27, D23:D27 and C23:C27.
View Attachment.
Thanks.
![]() |
Help, please,
http://www.pttbn.com/images/we.png
My biggest problem is how to add and subtract days, months and years in columns E23:E27, D23:D27 and C23:C27.
View Attachment.
Thanks.
Sorry for Attachment!
It's here.
Adding and subtracting DATES is simple when you treat dates as a whole. There is no need to break out years and months and days unless you're just wanting to see "elapsed time".
But any date is simple to add/subtract from in it's raw form.
Retirement date based on age:
=DATE(YEAR(A6)+65,MONTH(A6),DAY(A6))
Retirement age based on service:
=DATE(YEAR(A9)+40,MONTH(A9),DAY(A9))
Retirement date based on both, selecting which one comes first:
=MIN(DATE(YEAR(A6)+65,MONTH(A6),DAY(A6)),DATE(YEAR (A9)+40,MONTH(A9),DAY(A9)))
Thanks, JBeaucaire, Your words "subtracting DATES is simple when you treat dates as a whole" not disputed, but I need to break out years and months and days because working experience in the employment certificate is in this format.
So in your sheet, where exactly are you asking for help? What cells? What should the answer be?
In my sheet: C24:E24 and C25:E25, both in years, months and days.
I tried treat dates as a whole and find a solution around . First view Attachment.
Attachment
The problem is in the blue section. Those values don't really add up to usable data. For each row, you actually need a standard date value showing StartDate and EndDate. From that you can display your blue cells if you have some need to do so, but you would never try to add those values, it's nonsensical.
Instead, you would add/subtract from the actual date values you've places on that row from which those values were derived.
This is important, a generic number YEARS means different things in different years, some years are 365 days, some 366. Months are always 12 per year, but days in months are all over the place.
The only way to "hope" to get a close result is to use the actual start/end dates for each row.
I opted for Your option to use the actual start/end dates for each row.
Many thanks for help.
All times are GMT -7. The time now is 02:04 PM. |