1. Lighthouse

Level 6 · Deadlines and same-week checks with WEEKNUM

The request

From Logan Brooks, Email Marketing Specialist

“New customers get a welcome code that's valid for the number of days in I1 after signup. For the March 2024 signups I need the expiry date, for the reminder email, and a yes/no on whether they placed their first order in the same week they signed up.”

Your goal

In E2:E37, return the date the welcome code expires: the signup_date (column C) plus the days in I1. In F2:F37, return "yes" when the first order (column D) falls in the same week and the same year as the signup, otherwise "no". Use WEEKNUM with its default Sunday-to-Saturday weeks.

  • Fill E2:F37 with the right valuesnot done yet
  • With formulas, not typed numbersnot done yet
  • Use WEEKNUMnot done yet

Your sheet

Excel
The sheet for this level
ABCDEFGHIJ
1customer_idfirst_namesignup_datefirst_ordercode_expiressame_weekCode valid for (days)14
2722Mark2024-03-012024-03-01 15:45
3723Stephen2024-03-022024-03-03 22:47
4724Catherine2024-03-032024-03-04 21:48
5725Samantha2024-03-042024-03-05 21:35
6726Robert2024-03-042024-05-06 08:40
7727Kimberly2024-03-042024-03-06 20:15
8728Christine2024-03-042024-11-04 12:26
9729Megan2024-03-042024-03-05 07:00
10730Carolyn2024-03-072024-11-26 13:46
11731Megan2024-03-082024-03-08 18:03
12732Nancy2024-03-092024-03-10 19:58
13733Brandon2024-03-092024-03-09 10:05
14734Christopher2024-03-102024-09-21 22:56
15735Hannah2024-03-102024-03-10 08:00
16736Anthony2024-03-102025-09-03 09:02
17737Owen2024-03-112024-03-12 12:00
18738Frank2024-03-112024-03-12 13:02
19739Michael2024-03-112024-06-15 07:53
20740Deborah2024-03-122024-03-13 14:13
21741Joseph2024-03-132024-03-14 11:52
22742Andrew2024-03-132024-03-13 11:04
23743Lisa2024-03-152024-03-17 10:38
24744Kevin2024-03-162024-03-17 20:44
25745Olivia2024-03-172024-03-19 21:33
26746Valeria2024-03-202024-03-21 16:30
27747Douglas2024-03-202024-11-19 12:27
28748Brenda2024-03-212024-03-23 11:49
29749Dennis2024-03-212024-05-27 11:46
30750Paul2024-03-232024-03-23 20:23
31751Kenneth2024-03-242024-03-24 08:00
32752Brenda2024-03-242024-03-24 16:56
33753Mary2024-03-252024-03-25 15:59
34754Gregory2024-03-262024-03-28 07:15
35755Nancy2024-03-282024-03-29 09:28
36756Heather2024-03-302024-03-30 08:00
37757Dylan2024-03-312024-04-02 11:04
38
39

Loading the editor…

    ResultPress Check to compare E2:F37

    Mote checks your result

    Press Check. Each right cell becomes a firefly in your lantern.

    The lesson

    Logan’s welcome code is two date questions: when does it run out, and how fast did the customer act on it? Both get simple once you remember that a date is a count of days.

    A deadline is a sum

    The code is valid for 14 days after signup, and the 14 lives in I1. Because dates are numbers, the expiry is an addition:

    E2   =C2+$I$1

    Customer 722 signed up on 2024-03-01, so the code expires on 2024-03-15. Lock I1 with $ and fill down; if marketing extends the code to 21 days, one cell changes. The same pattern gives every “date plus N days” rule: a return deadline is the delivery date plus the return window, a payment due date is the invoice date plus 30.

    If the result shows as a number like 45366, the cell just lacks a date format. Here column E already has one. To count only working days, WORKDAY does what + does but skips weekends; it isn’t in this practice sheet, so we stick to calendar days.

    Which week is it?

    WEEKNUM(date) returns the week of the year, 1 to 53. By default a week runs Sunday to Saturday, and week 1 is the one that contains January 1. WEEKNUM(date,2) starts weeks on Monday instead. Pick one system and use it on both sides.

    Row Signup First order Days between Same week?
    2 Fri 2024-03-01 Fri 2024-03-01 0 yes
    3 Sat 2024-03-02 Sun 2024-03-03 1 no
    4 Sun 2024-03-03 Mon 2024-03-04 1 yes

    Row 3 is the case that catches people out. One day passed, but Saturday ends a week and Sunday starts the next, so WEEKNUM gives 9 and 10. “The same week” and “within 7 days” are different questions; ask which one the person means.

    The same week, in IF and AND

    F2   =IF(AND(WEEKNUM(C2)=WEEKNUM(D2),YEAR(C2)=YEAR(D2)),"yes","no")

    AND is TRUE only when both tests are. The YEAR test matters because week numbers restart every January: customer 736 signed up in week 11 of 2024 and first ordered in September 2025, and on a sheet with a returning customer who orders in week 11 of the next year, the week test alone would say “yes”. Filled down, 24 of the 36 customers ordered in their signup week.

    Common mistakes

    • WEEKNUM alone. Week 11 comes around every year. Add the YEAR test.
    • Mixing week systems. WEEKNUM(C2) against WEEKNUM(D2,2) compares Sunday weeks with Monday weeks.
    • Typing the days into the formula. =C2+14 works until the offer changes. Point at $I$1.
    • Comparing timestamps directly. C2=D2 is almost never TRUE: the first order carries a time. Compare the parts you care about, the week here, or INT(D2) for the day.

    Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.