View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Living the Dream Living the Dream is offline
external usenet poster
 
Posts: 151
Default 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.