backdating issue

chunter

New Member
Joined
Feb 6, 2004
Messages
12
We receiving orders for our products with an arrival date. I need to back up the date a certain number of transit days (depending on customer location) and then back up to the day of the week that customer truck leaves.

For example, Say we get an order for a part due to arrive at the customer on 7/19/11. Say this customer should have 3 days transit time and the truck only leaves on Mondays. I actually have to ship this on 7/11/11.

I've got lots of customers that will each have their own rules and have to compare them against a huge list of products. I'm planning to use a macro to loop through each row and calculate the new date. This'll save use a few hours per week in manpower plus help ensure our shipping is on time.

Any suggestions?

I've written lots of macros before but never have I dealt with dates.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Based on my experience with this sort of thing, I would recommend using formulas instead of macros. The reason I say that is that for most companies, these sorts of things can change fairly often.

Using formulas, you could have one sheet on your workbook devoted to transit times from your customers, one sheet with time it takes different to leave the warehouse and one for when trucks are sent out. Then, for a simple example, you could use VLOOKUPS to pull the appropriate information for each order, then you could take the max of all the picking times for the order + add the max transit time to the customer together with an if statement to state what day of the week the appropriate truck would leave to get a total transit time which you could then use to calculate the appropriate date to ship the items.

Obviously, the specific statements will depend on what your rules look like, but this sort of framework is pretty flexible.

Cheers, :)
 
Upvote 0
it looks like I may have gotten it to work. I used the weekday of the part to calculate how many days into this week it was. Added in how many days back into the previous week it had to ship. Subtracted this total from the received date and reentered it into a cell. Then I loop through each row. The only lengthy part of the program is supplying the information for each customer.

Now on to the next problem with this report.
 
Upvote 0

Forum statistics

Threads
1,224,543
Messages
6,179,429
Members
452,914
Latest member
echoix

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