Forum Discussion
How to produce a value for every nth value
I am trying to create a schedule for going to the gym. I go to the gym every day except Monday. So Tuesday I would do chest, Wednesday Arms, Thursday Legs and then it resets with chest on Friday, arms on Saturday. I have a list a dates scheduled out for 3 months starting from 6/21/24. How do I dynamically make it so every time the date is Tuesday-Sunday, it will automatically reset to chest or arms or legs in order while skipping Mondays for the next two months.
4 Replies
- SnowMan55Bronze Contributor
Your plan is to rotate through three activities in a six-day period (followed by a seventh day off). So every weekday will have a consistent activity.
Put the following two formulas into cells A2 and B2:
=SEQUENCE( 92, 1, DATE(2024,6,21) ) =CHOOSE( WEEKDAY(SEQUENCE(92, 1, A2, 1)), "Legs", "", "Chest", "Arms", "Legs", "Chest", "Arms" )(Spaces are included for readability, but are not required.)
Edit: Oh, and of course, format column A for dates, possibly with a custom number format such as (ddd) mmm dd, yyyy