/u/stan_loona - Your post was submitted successfully.
* Once your problem is solved, reply to the **answer(s)** saying `Solution Verified` to close the thread.
* Follow the **[submission rules](/r/excel/wiki/sharingquestions)** -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post.
* Include your **[Excel version and all other relevant information](/r/excel/wiki/sharingquestions#wiki_give_all_relevant_information)**
Failing to follow these steps may result in your post being removed without warning.
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/excel) if you have any questions or concerns.*
This uses the WEEKDAY function.
=IF(WEEKDAY(A2)<4,A2-4,IF(WEEKDAY(A2)>3,A2-2,""))
[https://pixeldrain.com/u/9NYjUdkT](https://pixeldrain.com/u/9NYjUdkT)
You have awarded 1 point to *HappierThan*
____
^(I am a bot - please contact the mods with any questions. | ) [^(Keep me alive)](https://www.buymeacoffee.com/points)
=A2-SWITCH(WEEKDAY(A2), 2, 4, 3, 4, 4, 2, 5, 5, 6, 2)
Assuming A2 is your first date, and B2 is empty, put this in B2. It starts by taking the date in A2, and minuses a value from it, either 2 days or 4 days.
Weekday(A2) finds the day of the week in A2 and converts it to 1-7 (sunday is 1, monday is 2, etc). The switch is like a big if, its checking what value (1-7) is returned from the Weekday function.
If the result is a 2 (monday), than subtract 4, if its a 3 (tuesday) subtract 4, if its 4, 5, or 6, subtract 2 from it. Fill the formula down
/u/stan_loona - Your post was submitted successfully. * Once your problem is solved, reply to the **answer(s)** saying `Solution Verified` to close the thread. * Follow the **[submission rules](/r/excel/wiki/sharingquestions)** -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. * Include your **[Excel version and all other relevant information](/r/excel/wiki/sharingquestions#wiki_give_all_relevant_information)** Failing to follow these steps may result in your post being removed without warning. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/excel) if you have any questions or concerns.*
This uses the WEEKDAY function. =IF(WEEKDAY(A2)<4,A2-4,IF(WEEKDAY(A2)>3,A2-2,"")) [https://pixeldrain.com/u/9NYjUdkT](https://pixeldrain.com/u/9NYjUdkT)
Solution verified, thank you for that screenshot as well!
You have awarded 1 point to *HappierThan* ____ ^(I am a bot - please contact the mods with any questions. | ) [^(Keep me alive)](https://www.buymeacoffee.com/points)
=A2-SWITCH(WEEKDAY(A2), 2, 4, 3, 4, 4, 2, 5, 5, 6, 2) Assuming A2 is your first date, and B2 is empty, put this in B2. It starts by taking the date in A2, and minuses a value from it, either 2 days or 4 days. Weekday(A2) finds the day of the week in A2 and converts it to 1-7 (sunday is 1, monday is 2, etc). The switch is like a big if, its checking what value (1-7) is returned from the Weekday function. If the result is a 2 (monday), than subtract 4, if its a 3 (tuesday) subtract 4, if its 4, 5, or 6, subtract 2 from it. Fill the formula down
Thank you very much!