The request

From Timothy Ross, Content Strategist
Your goal
In E2:E29, return each customer's signup month as text in the form yyyy-mm (TEXT on the signup_date in column D). In F2:F29, return the date one year after signup with EDATE, using the number of months in I1.
- Fill
E2:F29with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
TEXTEDATEnot done yet
Your sheet
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | customer_id | first_name | last_name | signup_date | signup_month | anniversary | Months until the email | 12 | ||
| 2 | 702 | Catherine | Kelly | 2024-02-14 | ||||||
| 3 | 703 | Marcus | Jenkins | 2024-02-16 | ||||||
| 4 | 704 | Jason | Davis | 2024-02-16 | ||||||
| 5 | 705 | Sofia | Lee | 2024-02-17 | ||||||
| 6 | 706 | Grace | Ruiz | 2024-02-17 | ||||||
| 7 | 707 | Daniel | Gallagher | 2024-02-18 | ||||||
| 8 | 708 | Sarah | Hudson | 2024-02-19 | ||||||
| 9 | 709 | Elizabeth | Howard | 2024-02-21 | ||||||
| 10 | 710 | Susan | Collins | 2024-02-21 | ||||||
| 11 | 711 | Katherine | Gomez | 2024-02-22 | ||||||
| 12 | 712 | Sofia | Thomas | 2024-02-22 | ||||||
| 13 | 713 | Justin | Hayes | 2024-02-22 | ||||||
| 14 | 714 | Steven | Alvarez | 2024-02-23 | ||||||
| 15 | 715 | Sophia | Collins | 2024-02-23 | ||||||
| 16 | 716 | Jessica | Lewis | 2024-02-24 | ||||||
| 17 | 717 | Linda | Gray | 2024-02-24 | ||||||
| 18 | 718 | Sofia | Anderson | 2024-02-26 | ||||||
| 19 | 719 | Jason | Edwards | 2024-02-28 | ||||||
| 20 | 720 | Abigail | Gomez | 2024-02-29 | ||||||
| 21 | 721 | Alexander | Cooper | 2024-02-29 | ||||||
| 22 | 722 | Mark | Long | 2024-03-01 | ||||||
| 23 | 723 | Stephen | Jones | 2024-03-02 | ||||||
| 24 | 724 | Catherine | Foster | 2024-03-03 | ||||||
| 25 | 725 | Samantha | Perez | 2024-03-04 | ||||||
| 26 | 726 | Robert | Hernandez | 2024-03-04 | ||||||
| 27 | 727 | Kimberly | Nelson | 2024-03-04 | ||||||
| 28 | 728 | Christine | Morales | 2024-03-04 | ||||||
| 29 | 729 | Megan | Hayes | 2024-03-04 | ||||||
| 30 | ||||||||||
| 31 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Timothy gets, and why
The lesson
Timothy’s email goes out on each customer’s anniversary, and his report groups customers by the month they joined. Both are date problems, and both get easier once you know what a date really is in a spreadsheet.
A date is a number
Excel stores a date as the number of days since the start of 1900. Day 1 is January 1, 1900, and
every day after adds one. D2 shows 2024-02-14, but the value in the cell is 45336. The
yyyy-mm-dd you see is a format laid on top of that number. Change the cell’s format to
General and you see the number itself.
Because dates are numbers, arithmetic works on them: =D2+1 is the next day, and =D3-D2 is
the number of days between two dates. Times are fractions of a day, so noon is 0.5. Google
Sheets uses the same numbers.
To pull one part out of a date, use the part functions:
| Formula | Result for D2 (2024-02-14) |
|---|---|
=YEAR(D2) |
2024 |
=MONTH(D2) |
2 |
=DAY(D2) |
14 |
=WEEKDAY(D2,2) |
3 (Monday = 1, so Wednesday) |
A month key with TEXT
To group customers by month you want one value per month that sorts in time order. Gluing the parts is the tempting way:
=YEAR(D2)&"-"&MONTH(D2)
It returns 2024-2. Next to 2024-11 that is a problem: sorted as text, 2024-11 comes before
2024-2, because the character 1 comes before 2. Use TEXT with a format instead:
E2 =TEXT(D2,"yyyy-mm")
It returns 2024-02, with the leading zero, so keys always sort in calendar order. Remember that
TEXT returns text: E2 is the characters 2024-02, not a date. That is fine for grouping and
labels, but you can’t add days to it.
Anniversaries with EDATE
EDATE(start, months) returns the date a number of whole months later (or earlier, with a
negative number):
F2 =EDATE(D2,$I$1)
I1 holds 12, so F2 shows 2025-02-14. The $ keeps every row on I1 when you fill down.
Why not =D2+365? Because years are not all 365 days. February 2024 had 29 days, so for the
signups from February 14 to 28, adding 365 lands one day early: D2+365 is 2025-02-13. EDATE counts
months, not days.
Look at rows 20 and 21: Abigail Gomez and Alexander Cooper signed up on 2024-02-29. There is no February 29 in 2025, so
EDATE returns the last day of February, 2025-02-28. That is the rule your email tool should
follow too.
Its sibling EOMONTH(start, months) returns the last day of a month: =EOMONTH(D2,0) is
2024-02-29, the end of the signup month, and =EOMONTH(D2,-1)+1 is the first day of it.
Common mistakes
MONTHalone as a key.MONTH(D2)is 2 for February of every year. Across several years, always include the year.- Keys without a leading zero.
2024-2and2024-11sort in the wrong order.TEXTwith"yyyy-mm"pads it. +365for “one year later”. Off by one around every leap day. UseEDATE.- Treating the key as a date.
TEXTreturns text. To keep a real date for the month, use=EOMONTH(D2,-1)+1and format it asyyyy-mm.
Lantern lit!
Practised: date serialstext functionedateyear month
- Solved
- No hints
- First run
