ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   adding rows (https://www.excelbanter.com/excel-discussion-misc-queries/2377-adding-rows.html)

Antoine

adding rows
 
How do I add rows without changing cell location in the formula.
For example:
The data for the formula is always located in cell B4 and if I
add a row on top of B4, I want the formula to remain with B4.
Right now, if I add a row, the cell in the formula goes down
one row.

Hope for help


Art

If I understand, you're adding a row higher than B4. This shifts B4 down,
but you want the "new" B4 to be the data for the formula. If this is the
case you could try this:

=formula(OFFSET(A1,3,1,1,1))

That is, as long as you don't add a new top row.

Art

"Antoine" wrote:

How do I add rows without changing cell location in the formula.
For example:
The data for the formula is always located in cell B4 and if I
add a row on top of B4, I want the formula to remain with B4.
Right now, if I add a row, the cell in the formula goes down
one row.

Hope for help


antoine


Thank you Art.

that is exactly what I was looking for

Antoine

"Art" wrote:

If I understand, you're adding a row higher than B4. This shifts B4 down,
but you want the "new" B4 to be the data for the formula. If this is the
case you could try this:

=formula(OFFSET(A1,3,1,1,1))

That is, as long as you don't add a new top row.

Art

"Antoine" wrote:

How do I add rows without changing cell location in the formula.
For example:
The data for the formula is always located in cell B4 and if I
add a row on top of B4, I want the formula to remain with B4.
Right now, if I add a row, the cell in the formula goes down
one row.

Hope for help


JE McGimpsey

A technique that survives adding a top row:

=formula(INDIRECT("B4"))

In article ,
Art wrote:

If I understand, you're adding a row higher than B4. This shifts B4 down,
but you want the "new" B4 to be the data for the formula. If this is the
case you could try this:

=formula(OFFSET(A1,3,1,1,1))

That is, as long as you don't add a new top row.


Art

I like that better!

Art

"JE McGimpsey" wrote:

A technique that survives adding a top row:

=formula(INDIRECT("B4"))

In article ,
Art wrote:

If I understand, you're adding a row higher than B4. This shifts B4 down,
but you want the "new" B4 to be the data for the formula. If this is the
case you could try this:

=formula(OFFSET(A1,3,1,1,1))

That is, as long as you don't add a new top row.




All times are GMT +1. The time now is 09:50 PM.

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