I am trying to add a number of days (shift the date) to a ‘Payment Date’ field. The number of days to add / shift depends on what day of the week the ‘Payment Date’ is. For example if the payment date was a Thursday (day = 5) or a Friday (day = 6), then I would like to add 4 days to the ‘Payment Date’. For all other days I would only like to add 2 days.
An Excel equivalent looks something like this:
=IF(WEEKDAY(P2)=5,P2+4,IF(WEEKDAY(P2)=6,P2+4,P2+2))