• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Date split as per the Tenure

fareedexcel

Member
Dear Experts,

I have a query on splitting the no. of years into Years, Months and Days.

For Example -
Date of Joining - 1-Jan-16.
Last Working Date - 10-Oct-18.
Tenure - 2.78 Years which needs to be splitted in 3 rows 2 years 9 months 10 days

1st row - 1-Jan-16 to 31-Dec-17 - 2 Years
2nd row - 1-Jan-18 to 30-Sep-18 - 9 Months
3rd row - 1-Oct-18 to 10-Oct-18 - 10 days

Again the challenge is, if DOJ - 1-Jan-16 and LWD - 31-Dec-19
there should be only one row,

1st row - 1-Jan-16 to 31-Dec-19 - 4 years

-------------------------------------------------------------------------------------------------

sample file is attached for reference. Kindly help
 

Attachments

  • Date Split Sample Scenarios.xlsx
    11.6 KB · Views: 9
But the above code is not splitting the data in rows as per the tenure. The requirement is as per the tenure the data should be split across the rows as per the scenarios mentioned in the attached sheet
 
Back
Top