Log in  \/ 
x
or
x
x
Register  \/ 
x

or

How to update formula when inserting rows in Excel? 

doc update formula inserting rows 1

For example, I have a formula =sum(D2:D7) in cell D8, now, when I insert a row at the second row and enter new number, the formula will be changed to =sum(D3:D8) automatically which excludes the cell D2 as following screenshot shown. In this case, I need to change the cell reference in the formula each time when I insert rows. How could I always sum the numbers start from cell D2 when inserting rows in Excel?

Update formula when inserting rows automatically with formula


arrow blue right bubble Update formula when inserting rows automatically with formula


The following simple formula can help you to update the formula automatically without changing the cell reference manually when inserting new rows, please do as this:

1. Enter this formula: =SUM(INDIRECT("D2:D"&ROW()-1)) (D2 is the first cell in the list that you want to sum) at the end of the cells that you want to sum the number list, and press Enter key.

2. And now, when you insert rows anywhere between the number list, the formula will be updated automatically, see screenshot:

doc update formula inserting rows 2

Tips: The formula only work correctly when you place it at the end of the data list.


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Katie · 1 years ago
    This is really helpful ... except it does not update the row/column when copying and pasting this formula, so if I have a bunch of them, I have to update the column/row manually (like in the example, if I copy this to the adjacent column E, it still has D ...)

    Unless someone knows a workaround to that problem, too?
    • To post as a guest, your comment is unpublished.
      Beatrice · 1 years ago
      you can use a different formula SUM(D$2:D12) as you insert a new row it continues to sum it up
  • To post as a guest, your comment is unpublished.
    Rayan · 3 years ago
    I have a simple cell reference in one of my cells down a column e.g.:"=H6", “=H7” etc.

    When I insert a row in Excel and copy formulas from row above, the cell reference in 'Opening Stock' does not update automatically in the row after the new blank row (should be equal to previous row balance, which is 60 now). But it updates correctly in all other rows below. Is there a way to force Excel to update cell reference to the cell in blank row above?

    Have searched the web, but did not get any satisfactory answer. I do not want to convert the data to a table, since it messes up the filters and formatting. Macros don't solve the problem either - they don't copy to the row following the blank one.

    Can anyone please help?
    • To post as a guest, your comment is unpublished.
      alainachkar@gmail.com · 10 months ago
      Hi Rayan!

      Please if you see this let me know! You are the only one I found online who brought this issue up. However, my data is table not normal range. The automatic filling of the formula really helps and copy/pasting is a hassle. Anyway, when insert a row, the formulas update for all columns except one! In the row and the cell, instead of the formula shifting from =if(C24 = C25) to =if(C25 = C26), it goes to =if(C24 = C26) although C24 is not fixed!!! I've really tried all possible solutions...................