PDA

View Full Version : Help using VBA



vinirato
08-06-2010, 12:47 PM
I have two worksheets that I use in my company for importation planning.

1) Order Stats: Here are all the importation orders that I already did, with each product, arriving date, quantity, number of the order and type of the freight.

2) Planning: Here I use to plan the importation of each product.

What i want to do is this:


I want a VBA code that get all the info from "Orders Stats" and put them on the WorkShhet "Planning".

For instance, "Orders Stats" line 2. Product 320061 is arriving 23/09/10, quantity 452, number 1234, freight shipping, order date 01/06/10.

The cold would find the sheet 320061 inside "Planning". Then it would find inside of which week the arriving data is (23/09/10). It would have to look the dats beteween the column C (Inicial Date) and P (Final Date).

Once it finds the date it would put in the column F (Entrance) the quantity that is arriving (452). Then it would change order stats to "REALIZ". After that it would change in column H "Type of Freight" to "M" (If the freight from ar it would put "A".

After that it would that order data (01/06/10) in column AA and number of the orders (1234) in column AB.

Theris is just one more thing. If there are two orders arriving in the same week the code would put the second one in the next week (the line below).

I will attach the two files to help understading.

Thanks

vinirato
08-06-2010, 12:56 PM
The second worksheet

vinirato
08-09-2010, 05:00 AM
anyone???