ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Add to current cell value (https://www.excelbanter.com/excel-discussion-misc-queries/221359-add-current-cell-value.html)

Ray D.

Add to current cell value
 
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?

Max

Add to current cell value
 
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
---
"Ray D." wrote in message
...
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?





All times are GMT +1. The time now is 05:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com