How to update formula when inserting rows in Excel?

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
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:
Tips: The formula only work correctly when you place it at the end of the data list.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
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!









