![]() |
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 |
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. |
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 |
All times are GMT +1. The time now is 04:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com