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!
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

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!
 

Watch MrExcel Video

Forum statistics

Threads
1,118,018
Messages
5,569,646
Members
412,285
Latest member
Daibear
Top