Note: Excel has several built-in data validation rules for dates.
This page explains how to create a your own validation rule based on a custom formula if you need more control or flexibility. T calculate the number of days between two dates you can simply subtract the older date from the newer date.
This date will update whenever the worksheet is recalculated or opened.
You can set up dynamic calendar grid on an Excel worksheet with a series of formulas, as explained in this article.
In the example shown, the formula in B6 is: =start-CHOOSE(WEEKDAY(start),0,1,2,3,4,5,6) where "start...
To calculate the days remaining from one date to another, you can use a simple formula that subtracts the earlier date from the later date.
In the example shown, the formula in D5 is: =C5-B5 How this formula works...
To sum sales in the last 30 days by an id (like name, initials, region, etc.) you can use the SUMIFS function together with the TODAY function.
In the example shown, the formula in G5, copied down, is: =SUMIFS($D:$D...
This of course depends on what is in your spreadsheet and if you need to use several different dates.
The result should be 42 as my date today is 12/2/19.
In the example shown, we are checking for dates in the last 7 days. If you want to highlight dates that occur in the next N days with conditional formatting, you can do so with a formula that uses the TODAY function with AND.
This is a great way to visually flag things like expiration...
To calculate a person's age from their birth date, you can use the YEARFRAC, INT, and TODAY functions.