Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Cell References When Inserting Rows
I have a sheet that I use to track monthly sales. Each month I insert a new row into row 7 and enter that month's sales. I have a formula in row 4 =SUM(H7:H18) that totals the previous 12 months. When I insert the new row, the formula changes to =SUM(H8:H19). Is there a way to lock the formula so that it will always reference rows 7 to 18? I've tried using a $ in front of the 7 & 18 but that doesn't work. -- officeplus215 ------------------------------------------------------------------------ officeplus215's Profile: http://www.excelforum.com/member.php...o&userid=27709 View this thread: http://www.excelforum.com/showthread...hreadid=472256 |
#2
|
|||
|
|||
Hi "officeplus215" , =SUM(H$8:H$19) would not work because inserting rows will change the addresses. What you have to do is to place the range within quotes so that it will not change: =SUM(INDIRECT("H8:H18")) --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "officeplus215" wrote... I have a sheet that I use to track monthly sales. Each month I insert a new row into row 7 and enter that month's sales. I have a formula in row 4 =SUM(H7:H18) that totals the previous 12 months. When I insert the new row, the formula changes to =SUM(H8:H19). Is there a way to lock the formula so that it will always reference rows 7 to 18? I've tried using a $ in front of the 7 & 18 but that doesn't work. |
#3
|
|||
|
|||
One way:
=sum(indirect("h7:h18")) officeplus215 wrote: I have a sheet that I use to track monthly sales. Each month I insert a new row into row 7 and enter that month's sales. I have a formula in row 4 =SUM(H7:H18) that totals the previous 12 months. When I insert the new row, the formula changes to =SUM(H8:H19). Is there a way to lock the formula so that it will always reference rows 7 to 18? I've tried using a $ in front of the 7 & 18 but that doesn't work. -- officeplus215 ------------------------------------------------------------------------ officeplus215's Profile: http://www.excelforum.com/member.php...o&userid=27709 View this thread: http://www.excelforum.com/showthread...hreadid=472256 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Maintaining cell references when inserting cells elsewhere | Excel Discussion (Misc queries) | |||
Automatically inserting rows | Excel Worksheet Functions | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
Cell References in Functiona | Excel Worksheet Functions | |||
parse cell and insert rows? | Excel Worksheet Functions |