How to get nearest dates for tues and fri

BriGhtZ

New Member
Joined
Dec 6, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I am looking for a formula to get the nearest dates for tues and Fri.

Source dates result dates
Monday. -> Tuesday
Tuesday -> Tuesday
Wednesday -> Friday
Thursday -> Friday
Friday -> Friday
Saturday -> Tuesday
Sunday -> Tuesday
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi, I am looking for a formula to get the next nearest dates for tues and Fri.

Source dates result dates
Monday. -> Tuesday
Tuesday -> Tuesday
Wednesday -> Friday
Thursday -> Friday
Friday -> Friday
Saturday -> Tuesday
Sunday -> Tuesday
 
Upvote 0
Assuming you have your dates in columna B, starting in B2, try this formula in C2 for example and copy down:

Excel Formula:
=LET(wd,WEEKDAY(B2,16),IF(wd<5,B2+4-wd,B2+7-wd))
 
Upvote 0
Suppose your actual date is in A1
It seems like you have 2 working days in week: Tue and Fri (0 in 1011011)

Code:
=WORDAY.INTL(A1-1,1,"1011011")
 
Upvote 0
How, I have tested all the codes. It's all working. Thank you
 
Upvote 0
I didn't know you could use a string like this as the Weekend argument. Nice! Thanks!!!
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,122,998
Members
449,092
Latest member
masterms

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top