I have a certain task that, depending on the day of the week that it is assigned, is always due either the upcoming Friday or the Following Wednesday. For example, if it is assigned on a Monday, it is due that Friday. If it assigned on a Thursday, it is due the following Wednesday. Here is the formula I use:
=IF(WEEKDAY(E3)=7,E3+6,IF(WEEKDAY(E3)=1,E3+5,IF(WEEKDAY(E3)=2,E3+4,IF(WEEKDAY(E3)=3,E3+3,IF(WEEKDAY(E3)=4,E3+7,IF(WEEKDAY(E3)=5,E3+6,IF(WEEKDAY(E3)=6,E3+5)))))))
I'd like to know how to write this formula (or a less complicated equivelent) using VBA so that I can incorporate it in a UserForm or other Macros.
Any suggestions? Thanks.
=IF(WEEKDAY(E3)=7,E3+6,IF(WEEKDAY(E3)=1,E3+5,IF(WEEKDAY(E3)=2,E3+4,IF(WEEKDAY(E3)=3,E3+3,IF(WEEKDAY(E3)=4,E3+7,IF(WEEKDAY(E3)=5,E3+6,IF(WEEKDAY(E3)=6,E3+5)))))))
I'd like to know how to write this formula (or a less complicated equivelent) using VBA so that I can incorporate it in a UserForm or other Macros.
Any suggestions? Thanks.