← All how-to recipes

How to find the next occurrence of a weekday (next Friday)

✓ Verified in LibreOffice 25.8.7.3

From any date, jump to the coming Friday (or any weekday) — schedules, deadlines, recurring events.

The formula

AppFormulaNotes
Excel=A2+MOD(5-WEEKDAY(A2,2),7)5 = Friday in mode 2 (Mon=1..Sun=7). Returns A2 itself if it's already Friday; use MOD(...,7)+7 variants to force strictly-next.
Google Sheets=A2+MOD(5-WEEKDAY(A2,2),7)Identical.
LibreOffice Calc=A2+MOD(5-WEEKDAY(A2,2),7)Identical.

How it works

WEEKDAY mode 2 numbers Monday=1 through Sunday=7, so 5−WEEKDAY gives how far away Friday is, and MOD ...,7 wraps negative gaps into the coming week: from Wednesday July 22 it's +2 days → Friday July 24. Swap the 5 for any target day. On the target day itself the formula returns that same day; if "next" must mean strictly after, use =A2+7-MOD(WEEKDAY(A2,2)+7-5,7)... or simply add IF(WEEKDAY(A2,2)=5,7,0).

Verified, not just documented

We ran =TEXT(DATE(2026,7,22)+MOD(5-WEEKDAY(DATE(2026,7,22),2),7),"YYYY-MM-DD") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 2026-07-24 — exactly the expected result. Every formula here is confirmed by actually executing it.