How can I check if a date is within 7 days of another date in Excel?

One can use the formula “=ABS(date1-date2)<=7” in Excel to check if a date is within 7 days of another date. This formula calculates the absolute difference between the two dates and checks if it is less than or equal to 7. If the result is True, then the dates are within 7 days of each other, otherwise they are not. This method can be useful for various tasks, such as tracking upcoming deadlines or monitoring project timelines.

Excel: Check if Date is Within 7 Days of Another Date


You can use the following formula to check if a specific date in Excel is within 7 days of another date:

=IF((C2-B2)<=7,"Within 7","Not Within 7")

This particular formula checks if the date in cell C2 is within 7 days of the date in cell B2 and returns “Within 7” or “Not Within 7” accordingly.

The following example shows how to use this formula in practice.

Example: Check if Date is Within 7 Days of Another Date in Excel

Suppose we have the following dataset in Excel that shows when various tasks were requested and when they were delivered by various employees at some company:

Suppose we would like to check if each task was delivered within 7 days of the request date.

We can type the following formula into cell D2 to do so:

=IF((C2-B2)<=7,"Within 7","Not Within 7")

We can then click and drag this formula down to each remaining cell in column D:

Column D returns either “Within 7” or “Not Within 7” depending on whether or not the request dates and delivery dates are within 7 days of each other.

If we’d like, we could also return values such as “Yes” or “No” instead:

=IF((C2-B2)<=7,"Yes","No")

We can enter this formula into cell D2 and click and drag it down to each remaining cell in column D:

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

x