ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Insert New Row without shifting formula (https://www.excelbanter.com/excel-worksheet-functions/47145-insert-new-row-without-shifting-formula.html)

DJ

Insert New Row without shifting formula
 
e.g. I have a formula in cell B4 that calculates data in column cells
C4 to, say, M4. (e.g. "=Sum($C4.$M4)") I then wish to insert a new C4
row, copy a new set of data into the new C4, but use the same formula
in B4 to calculate the new totals ("=Sum($C4.$M4)"). However, when I
insert the new row for C4, the formula in B4 shifts to now say
"=Sum($D4.$N4)". Is there an easy way to make this work ?


JMB

Possibly:

=Sum(Indirect("$C4.$M4"))

The down side is you won't be able to copy this formula across/down and have
excel automatically change the row reference (if this formula needs to be
copied).

"DJ" wrote:

e.g. I have a formula in cell B4 that calculates data in column cells
C4 to, say, M4. (e.g. "=Sum($C4.$M4)") I then wish to insert a new C4
row, copy a new set of data into the new C4, but use the same formula
in B4 to calculate the new totals ("=Sum($C4.$M4)"). However, when I
insert the new row for C4, the formula in B4 shifts to now say
"=Sum($D4.$N4)". Is there an easy way to make this work ?



JMB

Sorry - I did not notice you're summing two cells, not a range (comma vs
colon).


SUM(INDIRECT("$C4"),INDIRECT("$M4"))

"DJ" wrote:

e.g. I have a formula in cell B4 that calculates data in column cells
C4 to, say, M4. (e.g. "=Sum($C4.$M4)") I then wish to insert a new C4
row, copy a new set of data into the new C4, but use the same formula
in B4 to calculate the new totals ("=Sum($C4.$M4)"). However, when I
insert the new row for C4, the formula in B4 shifts to now say
"=Sum($D4.$N4)". Is there an easy way to make this work ?




All times are GMT +1. The time now is 04:26 PM.

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