The request

From Logan Brooks, Email Marketing Specialist
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:F37with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
WEEKNUMnot done yet
Your sheet
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | customer_id | first_name | signup_date | first_order | code_expires | same_week | Code valid for (days) | 14 | ||
| 2 | 722 | Mark | 2024-03-01 | 2024-03-01 15:45 | ||||||
| 3 | 723 | Stephen | 2024-03-02 | 2024-03-03 22:47 | ||||||
| 4 | 724 | Catherine | 2024-03-03 | 2024-03-04 21:48 | ||||||
| 5 | 725 | Samantha | 2024-03-04 | 2024-03-05 21:35 | ||||||
| 6 | 726 | Robert | 2024-03-04 | 2024-05-06 08:40 | ||||||
| 7 | 727 | Kimberly | 2024-03-04 | 2024-03-06 20:15 | ||||||
| 8 | 728 | Christine | 2024-03-04 | 2024-11-04 12:26 | ||||||
| 9 | 729 | Megan | 2024-03-04 | 2024-03-05 07:00 | ||||||
| 10 | 730 | Carolyn | 2024-03-07 | 2024-11-26 13:46 | ||||||
| 11 | 731 | Megan | 2024-03-08 | 2024-03-08 18:03 | ||||||
| 12 | 732 | Nancy | 2024-03-09 | 2024-03-10 19:58 | ||||||
| 13 | 733 | Brandon | 2024-03-09 | 2024-03-09 10:05 | ||||||
| 14 | 734 | Christopher | 2024-03-10 | 2024-09-21 22:56 | ||||||
| 15 | 735 | Hannah | 2024-03-10 | 2024-03-10 08:00 | ||||||
| 16 | 736 | Anthony | 2024-03-10 | 2025-09-03 09:02 | ||||||
| 17 | 737 | Owen | 2024-03-11 | 2024-03-12 12:00 | ||||||
| 18 | 738 | Frank | 2024-03-11 | 2024-03-12 13:02 | ||||||
| 19 | 739 | Michael | 2024-03-11 | 2024-06-15 07:53 | ||||||
| 20 | 740 | Deborah | 2024-03-12 | 2024-03-13 14:13 | ||||||
| 21 | 741 | Joseph | 2024-03-13 | 2024-03-14 11:52 | ||||||
| 22 | 742 | Andrew | 2024-03-13 | 2024-03-13 11:04 | ||||||
| 23 | 743 | Lisa | 2024-03-15 | 2024-03-17 10:38 | ||||||
| 24 | 744 | Kevin | 2024-03-16 | 2024-03-17 20:44 | ||||||
| 25 | 745 | Olivia | 2024-03-17 | 2024-03-19 21:33 | ||||||
| 26 | 746 | Valeria | 2024-03-20 | 2024-03-21 16:30 | ||||||
| 27 | 747 | Douglas | 2024-03-20 | 2024-11-19 12:27 | ||||||
| 28 | 748 | Brenda | 2024-03-21 | 2024-03-23 11:49 | ||||||
| 29 | 749 | Dennis | 2024-03-21 | 2024-05-27 11:46 | ||||||
| 30 | 750 | Paul | 2024-03-23 | 2024-03-23 20:23 | ||||||
| 31 | 751 | Kenneth | 2024-03-24 | 2024-03-24 08:00 | ||||||
| 32 | 752 | Brenda | 2024-03-24 | 2024-03-24 16:56 | ||||||
| 33 | 753 | Mary | 2024-03-25 | 2024-03-25 15:59 | ||||||
| 34 | 754 | Gregory | 2024-03-26 | 2024-03-28 07:15 | ||||||
| 35 | 755 | Nancy | 2024-03-28 | 2024-03-29 09:28 | ||||||
| 36 | 756 | Heather | 2024-03-30 | 2024-03-30 08:00 | ||||||
| 37 | 757 | Dylan | 2024-03-31 | 2024-04-02 11:04 | ||||||
| 38 | ||||||||||
| 39 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Logan gets, and why
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
WEEKNUMalone. Week 11 comes around every year. Add theYEARtest.- Mixing week systems.
WEEKNUM(C2)againstWEEKNUM(D2,2)compares Sunday weeks with Monday weeks. - Typing the days into the formula.
=C2+14works until the offer changes. Point at$I$1. - Comparing timestamps directly.
C2=D2is almost never TRUE: the first order carries a time. Compare the parts you care about, the week here, orINT(D2)for the day.
Lantern lit!
Practised: date arithmeticweeknumyearifand
- Solved
- No hints
- First run
