Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get/Find criteria and copy sum
Hi all
I know the subject title is a little vague, so here goes. What I would like to achieve is: One of the DC points that gets trucks actually unloads stock for another DC on the same site, but the primary drop of point is "A" if there is a mixed load of stock for "A" & "B". The guys in DC A are wanting to automatically calc how many extra lifts they have to do based on the report I send them. So using the example below: Driver/Route X will be dropping off 2 Stacks for DC A & 1 Stack for DC B Driver/Route Y will be dropping off 15 Stacks for DC A only I have it sorted so that DC A will always be at the top of every Driver grouping. F G J N P Dest Stacks Route Time Lifts 1 Jack A 1 X 9.00 2 Jill A 2 X 9.00 3 Humpty B 1 X 9.00 4 Donkey A 10 Y 9.30 5 Ogre A 5 Y 9.30 So, the code needs to operate something like so: For each Route(Grouped Driver) IF Time = Same(Route arriving at the same time) Then IF c.Offset(,-4).value = "B" Then The first row of the group @ Column P will be the sum of Stacks from Column G Then Delete the row(s) where DC = B F G J N P Dest Stacks Route Time Lifts 1 Jack A 1 X 9.00 1 2 Jill A 2 X 9.00 4 Donkey A 10 Y 9.30 5 Ogre A 5 Y 9.30 I'm not totally convinced it is achievable, but I'm always hopeful. Glass half full.. :) As always, heaps of thanks in advance. Mick. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get/Find criteria and copy sum
hi Mick,
Column P will be the sum of Stacks from Column G in your example the result in column "P" is 1, it should not be 2 ? isabelle Le 2013-09-02 08:38, Living the Dream a écrit : Hi all I know the subject title is a little vague, so here goes. What I would like to achieve is: One of the DC points that gets trucks actually unloads stock for another DC on the same site, but the primary drop of point is "A" if there is a mixed load of stock for "A" & "B". The guys in DC A are wanting to automatically calc how many extra lifts they have to do based on the report I send them. So using the example below: Driver/Route X will be dropping off 2 Stacks for DC A & 1 Stack for DC B Driver/Route Y will be dropping off 15 Stacks for DC A only I have it sorted so that DC A will always be at the top of every Driver grouping. F G J N P Dest Stacks Route Time Lifts 1 Jack A 1 X 9.00 2 Jill A 2 X 9.00 3 Humpty B 1 X 9.00 4 Donkey A 10 Y 9.30 5 Ogre A 5 Y 9.30 So, the code needs to operate something like so: For each Route(Grouped Driver) IF Time = Same(Route arriving at the same time) Then IF c.Offset(,-4).value = "B" Then The first row of the group @ Column P will be the sum of Stacks from Column G Then Delete the row(s) where DC = B F G J N P Dest Stacks Route Time Lifts 1 Jack A 1 X 9.00 1 2 Jill A 2 X 9.00 4 Donkey A 10 Y 9.30 5 Ogre A 5 Y 9.30 I'm not totally convinced it is achievable, but I'm always hopeful. Glass half full.. :) As always, heaps of thanks in advance. Mick. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get/Find criteria and copy sum
Hi Isabelle
Apologies for not getting back sooner. ( sooo many other projects and never enough time :) ). The answer is 1 as Humpty is the only one that fits the criteria. So, as Humpty = B, his G.Value is copied to the first row of his group(X) and his row is deleted. Hope this help clear it up a little better. Still keep my glass half full that this can be conquered. TIA Mick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I find and copy rows based on specific criteria? | New Users to Excel | |||
Copy contents of Find (Find and Replace) | Excel Discussion (Misc queries) | |||
EXCEL - Meet 2 criteria, then find next case of third criteria | Excel Worksheet Functions | |||
Where is "open/tools/find/find files that match these criteria"? | Excel Discussion (Misc queries) | |||
multiple search criteria to find and copy from sheet1 and paste into sheet2 | Excel Programming |