By itself, theSUM functioncan usually accommodate the insertion of new cells of data into the range being summed.

One exception comes up whenever the data is inserted into the cell where the function is currently located.

To follow along with this tutorial, open a blank Excel worksheet and enter the sample data.

Screenshot of example data in Excel

This is accomplished by setting the endpoint of the range to one cell above the location of the formula.

Initially, the formula was entered into cell B6 and totaled the sales data for four days.

This is accomplished byinserting a new row6, which moves the formula to row 7.

Formula tab in Excel

Select cellB6, which is the location where the formula results will initially display.

Select theFormulastab of theribbon.

In theFunction Argumentsdialog box, place the cursor in theNumber1text box.

Math & Trig button

In the worksheet, select cellB2to enter this cell reference in the dialog box.

This location is the static endpoint for the formula.

In theFunction Argumentsdialog box, place the cursor in theNumber2text box.

SUM menu item in Excel

EnterOFFSET(B6,-1,0).

This OFFSET function forms the dynamic endpoint for the formula.

SelectOKto complete the function and terminate the dialog box.

Number1 field with B2 in it

The total appears in cell B6.

SelectInsertto insert a new row into the worksheet.

The SUM OFFSET formula moves down one row to cell B7 and row 6 is now empty.

Number2 field with OFFSET(B6,-1,0) in it

Select cellA6and enter the number5to indicate that the sales total for the fifth day is being entered.

Select cellB6, enter$1458.25, then pressEnter.

Cell B7 updates to the new total of $7137.40.

Screenshot of total and formula in B7

When you select cell B7, the updated formula appears in the formula bar.

The OFFSET function has two optional arguments: Height and Width,which were not used in this example.

Insert command in Excel

New total inserted in Excel