Get/Find criteria and copy sum

  • Thread starter Living the Dream
  • Start date
L

Living the Dream

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.
 
I

isabelle

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".
 
L

Living the Dream

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top