Apologies if this has been asked before. I am have a macro that runs weekdays at 9am. If the day is Monday, Wednesday or Friday i'd like enter an IF block.
Granted I could just make another macro with a different set of days, but I wonder if this can be done inline?
thank you.
The DOW() function returns day of week as a number (1
for Sunday, 2
for Monday etc.)
As it happens your chosen days are all the even numbered days of the week, so setting up your calculation condition as (DOW() MOD 2) - 1
should return true if current day is a Monday, Wednesday or Friday.
A more general approach would be something in the lines of DOW() = 2 OR DOW() = 4 OR DOW() = 6
Or a Text Condition If %Calculate%DOW()%
Matches 2|4|6
6 Likes