# Excel Formula

#### uab_00

##### New Member
Hi I;m trying to create a Maternity Leave calculator, If I have a due date and I want to start my maternity Leave 14 days before due date, how can I do?I know if I do the due date - 14 I got it, but what about if the due date is on a Saturday or Sunday and I want my Maternity Leave start on the following Monday?
And what about the return to work day?I know that I have 26 weeks from the start of My Maternity, same as above my Maternity end on a Saturday or Sunday and I want my Return to work start on the following Monday?
Thanks

### Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
This formula will either give you the same date if its a weekday in A1 or the following Monday if a weekend date is placed in A1:

=A1+CHOOSE(WEEKDAY(A1),1,0,0,0,0,0,2)

Thanks a lot and what about if I want to keep the cell blank if the due date is not entered and If I want to subtract from the due date 14 days?

I put the below but it does not work, the due date is placed in b6

=IF(B6="","",B6-14,B6+choose(weekday(B6),1,0,0,0,0,0,2))
Thanks

That would be

=IF(A1="","",A1-14+CHOOSE(WEEKDAY(A1-14),1,0,0,0,0,0,2))

Thanks a lot)

Replies
5
Views
256
Replies
3
Views
196
Replies
7
Views
342
Replies
11
Views
983
Replies
3
Views
160

1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back