Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

date from given day name

Hi, just wondering if it is possible to have numbers calculate the next date of a given day name.


eg. when a weekday name is entered or selected from a popup menu can Numbers return a date the next occurrence.


MacBook Air 13″, macOS 11.4

Posted on Aug 10, 2021 12:00 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 11, 2021 6:33 AM

petergoode wrote:

when a weekday name is entered or selected from a popup menu can Numbers return a date the next occurrence.


You can do this in one cell if you want:




A2 has a Pop-Up Menu with the names of the day of the week.


B2 has this formula:


=TODAY()+MOD(MATCH(A2,{"Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";"Friday";"Saturday";"Sunday"},0)−WEEKDAY(TODAY()),7)


SG

4 replies
Question marked as Top-ranking reply

Aug 11, 2021 6:33 AM in response to petergoode

petergoode wrote:

when a weekday name is entered or selected from a popup menu can Numbers return a date the next occurrence.


You can do this in one cell if you want:




A2 has a Pop-Up Menu with the names of the day of the week.


B2 has this formula:


=TODAY()+MOD(MATCH(A2,{"Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";"Friday";"Saturday";"Sunday"},0)−WEEKDAY(TODAY()),7)


SG

Aug 10, 2021 2:01 PM in response to petergoode

I can't think of a direct formula or functions that would do it. Here is a way that requires a lookup table and a few columns/cells. There may be a better way.



Table 2 is just what you see. I created a popup from the day names I typed into column A, which is why you see A1 as a popup in the screenshot.


Formulas in Table 1:

B2 is a popup with day names

C2 =MATCH(B2,Table 2::A)

D2 =WEEKDAY(TODAY())

E2 =TODAY()+C2−D2+IF(C2>D2,0,7)

Fill down with all formulas to complete the columns

Hide columns C and D afterward


You can do away with columns C and D if you put their formulas directly into the formula in E, in the two places each where C and D are referenced.

date from given day name

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.