Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
officeplus215
 
Posts: n/a
Default 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   Report Post  
David McRitchie
 
Posts: n/a
Default


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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining cell references when inserting cells elsewhere Stephen Jefferson Excel Discussion (Misc queries) 3 August 5th 05 09:30 PM
Automatically inserting rows ausdiver99 Excel Worksheet Functions 1 June 2nd 05 02:15 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Cell References in Functiona Mark T. Excel Worksheet Functions 1 December 11th 04 06:49 PM
parse cell and insert rows? Gorrila Grod Excel Worksheet Functions 3 November 5th 04 08:19 AM


All times are GMT +1. The time now is 11:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"