I have a "For" Loop that runs to help me in a scheduling program. Each 'For' until a specified Qty is reach copies & pastes a new line in a sequence of planning days, for example, planningday=1, then 2, then 3...until the set number is reached.
I added the code to assign a "Day 1" when planningday =1, and "Day 2" when planningday =2. I have two problems though, I can not get my formula to replicate in subsequent cells, i.e. each line that is copied & pasted in should be assigned a "Day #" and also as it is set up now, the day changes bc the planningday cycles 1 through set #., so when it starts, it reads correctly, Day 1, but by planning day 4, it reads Day 4, when the top line should say Day 1...then Day 2...then Day 3...etc.
This is the code:
The italicized lines are what I added, I think my logic is too simple for what I need it to do.Please Login or Register to view this content.
EDIT **I hope this works. I've had issues trying to get help with this.
Here is an overview of what is going on, the table in COL Schedule is updated in the first set of code, then a ranking is created in the second set of code. It is ranked by columns K divided by H, which creates a percent of Safety Stock, then that is sorted within the same code least amnt to highest. So that the Item number with the biggest gap between the % and 100% is ranked at the top.
Then, Based on what is ranked at the top, the program pulls a batch size (based on information put into the tab ColSched Start Here) and says we will build that batch size., it copies & pastes (values only) that line with the Batch size (also known as BuildQty) into Columns Q ~ W . Then the bacth size is added to the Oh Qty in Column K, then the entire list is resorted and the process is repeated, until the desired daily rate is reached (also in Tab ColSched Start Here). Then the entire process is repeated for the specified # of days, 1 to 5 or something. In the example given batch size 18, daily rate 54, days planned 4, so each time 3 lines would be pasted it would move to the next planned day.
If you watch Column X, listed as Day, you will see the value fills in based on what day is being planned, 1~4 or given #. what I need is an assigned "day 1", "Day 2", etc, to fill in each time a line is pasted, and the value must match the lines planned day not the current planned day.
I'm horrible at explaining things, I hope this isn't too big a mess.**
Bookmarks