Calculate total dates within a column that are within the last 7 days

What is the best formula to calculate column E's total dates that are within the last 7 days? (see attached screenshot) for example, if two dates in this column were within the last 7 days, the formula would calculate 2 in the footer row.


** Please note that Column E's data formatting is set up as Date and not automatic or text (except for the footer row).



Apple Numbers version 13.2 (7038.0.87)

macOS 13.6.1 (22G313)


Thank you,

MacBook Pro 16″, macOS 14.1

Posted on Oct 30, 2023 1:54 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 30, 2023 2:48 PM

COUNTIF(E,">"&TODAY()−DURATION(,7))


3 replies

Oct 30, 2023 5:16 PM in response to chadb427

This also works, as Duration assumes days when you don't specify.



=COUNTIF(F,">"&TODAY()−7)


Replace , with ; in the formula if your region uses , as the decimal separator.


Note that Numbers always contains date and time even if you have formatted the cell not to display time.


TODAY gives at time of 12:00 AM (the previous midnight that starts the day). So if today is October 31 the formula matches from and including October 24. Adjust the 7 if that is not quite what you want.


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Calculate total dates within a column that are within the last 7 days

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.