How to find the next occurrence of a weekday (next Friday)
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)From any date, jump to the coming Friday (or any weekday) — schedules, deadlines, recurring events.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =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. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 2026-07-24 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
MOD · WEEKDAY — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to convert minutes to hours and minutes
- How to get the first day of the week for any date
- How to identify weekends with a formula
- How to sum values by day of the week
- How to sum every nth row