+ Reply to Thread
Results 1 to 3 of 3

Cell References When Inserting Rows

  1. #1
    Registered User
    Join Date
    09-30-2005
    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.

  2. #2
    David McRitchie
    Guest

    Re: Cell References When Inserting Rows


    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" <[email protected]> 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. #3
    Dave Peterson
    Guest

    Re: Cell References When Inserting Rows

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1