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

Count number of days.

trianna

New Member
Hello everyone,

I’m hoping for assistance in creating a calculation within Excel 2016 to count the number of days between dates.

Requirements:
Count the number of days between Event Start Date and Event End Date
  • If both the Event Start Date and Event End Date cells are empty, cell should equal o (zero)
  • Count 1 (one) date for events beginning and ending on the same date.
  • If the Event Start Date is populated and the Event End Date cell is empty, calculate the Event End Date as Today’s date, TODAY()
  • Re-calculate Event End Date when correct Event End Date is entered

I used the following formula, it works great except when both the Event Start Date and Event End Date are empty. It returns 43153 instead of 0 (zero). The column is formatted as a number with no decimal places.

=IF(O5>0,O5-N5,TODAY()-N5)+1

Please see attached data example.

Thank you for any assistance you can offer.

Trianna
 

Attachments

  • Number of days.xlsx
    10 KB · Views: 7
John,

Your example worked like a charm!!!

I will need to consider COUNT and COUNTIF going forward.

Thank you very much for your assistance.

Trianna
 
Back
Top