• 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.

How to calculate dates between two dates

Molson

New Member
I have a spreadsheet with a series of tasks that have a start date and and end date. Task number 1 has a start date of 06/01/15 and an end date of 05/25/16. I have been able to calculate the number of months between each date using =DATEDIF(startdate,enddate,"m"). The result of this = 11 months. I would like to calculate a date (end of month) for each of the 11 months.

Any help with this would be very appreciated

Thank you
 
Hi Molson,

I have made a sheet for you as per my understanding.

I am not much familiar with DATEDIF, but see if this is okay.

Regards,
 

Attachments

  • Calculate Dates Datedif - Molson.xlsx
    10.4 KB · Views: 3
Hi Molson,

I have made a sheet for you as per my understanding.

I am not much familiar with DATEDIF, but see if this is okay.

Regards,

Hi Khalid,

This is very helpful. One small request. Would you be able to reference the formula in columns instead of rows in a single column. I tried to change your formula to use =COLUMN() but I got lost in the cell references. I have uploaded your sheet with the change request. I very much appreciate the help

Regards
 

Attachments

  • Calculate Dates Datedif - Molson.xlsx
    11.4 KB · Views: 2
Hi Khalid,

This is very helpful. One small request. Would you be able to reference the formula in columns instead of rows in a single column. I tried to change your formula to use =COLUMN() but I got lost in the cell references. I have uploaded your sheet with the change request. I very much appreciate the help

Regards

Here it is....

But I have just noticed a problem, 31-July-15 is missing in both version :mad:
Don't know why.
 

Attachments

  • Calculate Dates Datedif - Columns.xlsx
    10.5 KB · Views: 5
Thank you. I will take a look at the 31 Jul issue.

Best regards

Hi Khalid

The formula will always skip the second month. Perhaps it is related to the column reference due to column "C"

I will continue to troubleshoot. If you find the issue please let me know
 
Hi Khalid

The formula will always skip the second month. Perhaps it is related to the column reference due to column "C"

I will continue to troubleshoot. If you find the issue please let me know

Hi Molson,

I tried this for column version, and its working, please check:

=IF(EOMONTH(EDATE($B2,-1),COLUMN(A1))>EOMONTH($B3,0),"",EOMONTH(EDATE($B2,-1),COLUMN(A1)))

Regards,
 
Back
Top