Running Total Problem

M

mark.p.j

Hello All,

Can anyone solve my problem.

I have a series of data (8000+ Rows) which I have extracted from
database using SQL, which contains the following information: -

Column A = Part Numbers *(First Sort)*

Column B = Purchase Order No. / Reservation No.

Column C = Purchase order Delivering quantity / Reservation Quantity.

Column D = Action Date * (Second Sort)*

Column E = Stock Holding (Open stock balance, duplicated o
each row, can
only be used o
the first calculation to get an
opening stoc
balance)

I'm trying to create a running total of (stock holding) plus (Purchas
order delivery / Reservation quantity). in Column F.

I can do this by using the following formula No. 1 =E2+C2 (For F2) an
then Formula No.2 F2+C3 (for F3) repeating this formula to the nex
part number.

The problem I have is that I'm trying to get a new running total fo
each change in part number. If I drag the second formula all the wa
to the bottom of the series of data, each part numbers informatio
would add its self to each other.

Is there any programming in visual basic that could look for the par
number change and change the formula accordingly?

I'm trying to Run a manual MRP (Materials Requirements Planning
system, if anyone is familiar.

Mar
 
T

Trevor Shuttleworth

Mark

Assuming you have headers in row 1, try:

in cell F2: =IF(A2<>A1,E2+C2,F1+C2)

and drag down

Regards

Trevor
 
T

Trevor Shuttleworth

Mark

you're welcome. Thanks for the feedback; it's good to know that it has
helped.

Regards

Trevor
 

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