Reference Previous Row with ROW

  • Thread starter Thread starter donc
  • Start date Start date
D

donc

This seems pretty straightforward, but I don't get good results with
anything I've tried.

I want to reference the previous row in a (simple) formula so that if a
blank row is inserted above, the formula refers to the new blank row
instead of the old previous row, which is now one row further up.

=ROW() gives me the row number of a cell. I figure that =$D(row()-1)
should refer to the previous row, column D. But it don't.

Is there a simple way to do this?

Thanks for any help.

donc
 
Sounds to me like you could use an offset formula.

This one sits in cell A6, and it refers to the cell one row above itself.

=OFFSET(A6,-1,0)

If you insert a new row 6, the formula will change to =OFFSET(A7,-1,0), i.e.
it will refer to the new blank row you just inserted.
 
donc wrote...
...
. . . I figure that =$D(row()-1) should refer to the previous row,
column D. But it don't.
...

If you're entering this in col D, try

=INDIRECT("R[-1]C",0)

If you're entering this in some other col, maybe hard-code the col

=INDIRECT("R[-1]C4",0
 
The INDIRECT method works very well... I now understand what INDIRECT is
doing.

Thanks All.

donc
 
Back
Top