Calculating Weekdays with Adjustments

Da Food Guy

New Member
Joined
Dec 2, 2005
Messages
39
I am building a simple calculator for some of my corworkers, and I need some formula help.

Basically I am creating a calculator that you enter a ship date, then subtract days for lead time. I have the simple part down, but I need it to report on the workday BEFORE the deadline to ship (i.e if it falls on a sunday, then it needs to ship on the previous friday).

Both the ship date and the leadtime are fixed seperate cells that the user will change as needed for the customer.

Thanks in advance!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Barrie Davidson

MrExcel MVP
Joined
Feb 10, 2002
Messages
2,330
Welcome to MrExcel!

Assuming your calculated ship date is in cell A1,

=IF(WEEKDAY(A1,2)>5,A1+5-WEEKDAY(A1,2),A1)

Does this help you out?

Regards,
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
You could use the WORKDAY function available with Analysis ToolPak.

If your ship date is in A1 and lead time (in days) in B1

=WORKDAY(A1-B1+1,-1)
 

Da Food Guy

New Member
Joined
Dec 2, 2005
Messages
39
Thanks!

Sorry Mr. Davidson, I forgot to mention that I was using two fields (one for the ship date, the other for the lead time). Mr. Houdini's solution worked perfectly. Thanks to everyone!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,129
Messages
5,857,537
Members
431,884
Latest member
Gcmoore63

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
Top