VBA - Push column I data down depending on F

marshy3300

Board Regular
Joined
Aug 17, 2014
Messages
59
Hi - I have a report that spits out false info. Due date (F) populates 2 dates. In this case there are 4 x 27/06/19 that shouldn't exist. This in turn means the WIP Qty is 4 numbers short (I).
How can I push (I) down everytime it finds the wrong date? That would also depend on Job # (C) being the same.
As an FYI, the first line for each Job# will always be correct, its only the "required to make product xx" which stuffs up the report.

[TABLE="width: 589"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD][TABLE="width: 900"]
<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Job #[/TD]
[TD]Item #[/TD]
[TD]Item Description[/TD]
[TD]Due Date[/TD]
[TD]Job Qty[/TD]
[TD]Picked Qty[/TD]
[TD]WIP Qty[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 1[/TD]
[TD]Product 1[/TD]
[TD]4/07/2019[/TD]
[TD]4[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 2[/TD]
[TD]Product 2[/TD]
[TD]4/07/2019[/TD]
[TD]29[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 3[/TD]
[TD]Product 3[/TD]
[TD]4/07/2019[/TD]
[TD]9[/TD]
[TD] [/TD]
[TD]9[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 4[/TD]
[TD]Product 4[/TD]
[TD]4/07/2019[/TD]
[TD]51[/TD]
[TD] [/TD]
[TD]51[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 4a[/TD]
[TD]required to make product 4[/TD]
[TD]27/06/2019[/TD]
[TD]51[/TD]
[TD] [/TD]
[TD]125[/TD]
[TD]Red[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 4b[/TD]
[TD]required to make product 4[/TD]
[TD]27/06/2019[/TD]
[TD]102[/TD]
[TD] [/TD]
[TD]25[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 4c[/TD]
[TD]required to make product 4[/TD]
[TD]27/06/2019[/TD]
[TD]51[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 5[/TD]
[TD]Product 5[/TD]
[TD]4/07/2019[/TD]
[TD]125[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 6[/TD]
[TD]Product 6[/TD]
[TD]4/07/2019[/TD]
[TD]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 6a[/TD]
[TD]required to make product 6[/TD]
[TD]27/06/2019[/TD]
[TD]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67111[/TD]
[TD]Product 7[/TD]
[TD]Product 7[/TD]
[TD]4/07/2019[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67200[/TD]
[TD]Product 20[/TD]
[TD]Product 20[/TD]
[TD]4/07/2019[/TD]
[TD]7[/TD]
[TD] [/TD]
[TD]7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]67200[/TD]
[TD]Product 20a[/TD]
[TD]required to make product 20[/TD]
[TD]27/06/2019[/TD]
[TD]7[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67200[/TD]
[TD]Product 27[/TD]
[TD]Product 27[/TD]
[TD]4/07/2019[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]67200[/TD]
[TD]Product 27a[/TD]
[TD]required to make product 27[/TD]
[TD]27/06/2019[/TD]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Not even sure its possible!
Thanks in advance
 
Hi Dante,

There inst a way. Experience on my end to know that "4a, 4b" are required for 4. The pattern that does exist is the date. So how it changes from 4/07 to 27/06 and then back to 4/07 on another valid code (original post)
As for descriptions mentioning it, or codes being similar... That's not the case.
Sorry, when i changed the names/descriptions i didn't think so much focus would be on those 2 columns.

I can say that the WIP Qty 125 (product 4a) really belongs to product 5. The 25 below that belongs to product 6.
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Thanks to you Both (Dante provided the guts and Foo with the change to date)
It does work once filtering per Job. Once i ran it I've realised Due Date also changes for priority stock. It can have a separate date than the bulk which results in pushing everything down.

I'll try to incorporate another variable into what you have provided to cater for that.

Thanks heaps guys, been amazingly helpful.
 
Upvote 0
Thanks to you Both (Dante provided the guts and Foo with the change to date)
It does work once filtering per Job. Once i ran it I've realised Due Date also changes for priority stock. It can have a separate date than the bulk which results in pushing everything down.

I'll try to incorporate another variable into what you have provided to cater for that.

Thanks heaps guys, been amazingly helpful.


Thanks footoo for the complement, good work.

I like to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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