Add to current cell value

R

Ray D.

What I want to do is simple... I have a set of data in a single
column, but at some points this data resets to 0. I don't want this,
so my idea for fixing the data is to add the current cell value to the
cell value before 0.

I'll try and illustrate this with an example...

Say my column looks as follows...

1
2
3
4
5
6
7
8
0
1
2
3
4

The zero indicates a point where the data stream was inadvertently
reset. So the optimal solution would be to add the value '8' to the
remainder of the cell values to readjust, which would look as follows:

1
2
3
4
5
6
7
8
8
9
10
11
12

Problem is, when I try and add the current cell to the formula, it
gives me a circular reference warning. I kind of need to get around
this, so what is the best way?
 
M

Max

Assuming there's going to be only one reset point in the data stream, one
tinker which gets the results you seek in an adjacent col

Assume source data in A1 down
In B1:
=IF(ROW()>=MATCH(0,A:A,0),INDEX(A:A,MATCH(0,A:A,0)-1)+A1,A1)
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
 

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