Transform your date formulas to automatically adapt when an end date is entered

If you're looking to enhance your spreadsheet's functionality, consider modifying your current formula to accommodate an end date in addition to the start date.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

We see this question often, and it points to a simple truth: most spreadsheet formulas are built for static data, but our work is rarely static. The user here has a clean setup, a start date, a potential end date, and a formula that calculates elapsed time. The problem is that their formula is hardcoded to always use `TODAY()`. That works fine for tracking a running count, but the moment they enter an end date, the logic breaks. They need a formula that can switch between two behaviors automatically: use today until an end date is provided, then use that end date instead.

This is exactly the kind of friction that makes traditional spreadsheets feel rigid. The solution is straightforward, and it's a small transformation that unlocks a much more dynamic workflow. The user can wrap their `DATEDIF` calls inside an `IF` statement: `IF(Q3="", DATEDIF(P3,TODAY(),"y"), DATEDIF(P3,Q3,"y"))`, and repeat for months and days. When Q3 is empty, the formula calculates to today. When Q3 has a date, it uses that date. That's it. No manual switching, no separate columns, no conditional formatting workarounds. The formula adapts to the data, not the other way around.

What this reveals is a deeper opportunity. The user isn't asking for a more complex tool, they're asking for a smarter one. They want their spreadsheet to behave like a living document that understands context. An AI-native spreadsheet can take this further. Instead of writing nested `IF` statements by hand, a user could simply describe the rule: "Show elapsed time from start to today, but switch to end date when one is entered." The system translates that intent into the correct formula, tests it for edge cases, and explains what it does. The user stays focused on the outcome, tracking time accurately, rather than debugging syntax.

This example also highlights how small wins build confidence. Once users see that a single `IF` can make a formula context-aware, they start asking bigger questions: Can I trigger alerts when a project runs past its end date? Can I visualize timelines that automatically extend or contract? Each answer leads to a more capable workflow. The goal isn't to replace the spreadsheet, it's to remove the friction that makes spreadsheets feel like a chore. When the data drives the logic, the user reclaims time for the work that actually matters.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

I have three columns, one is start date (P3), one is end date(Q3), and one is total time (R3). I have the time one set right now with

=DATEDIF(P3,TODAY(),"y")&"y "&DATEDIF(P3,TODAY(),"ym")&"m "&DATEDIF(P3,TODAY(),"md")&"d"

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community