Calculation Issues

Automatically Calculate Durations and Extend Formulas in Excel

Bushra ParveenBushra Parveen Oct 19, 2026 870 views

Question details

The user needs a method to calculate time durations in a specific column and wants the formula to automatically update and apply to any newly added rows without manual intervention.

Automatically Calculate Durations and Extend Formulas to New Rows in Excel
Product
Excel
Device & OS
not provided
Scenario
Entering new data records into a worksheet where a duration formula needs to be calculated automatically for every new entry.
Observed behavior
The user wants to avoid manually dragging or copying the duration formula down every time a new row of data is inserted into the worksheet.
Before you start

Ensure that your start and end times are properly formatted as 'Time' or a custom time format (such as h:mm) so that the mathematical calculation for duration works accurately.

Solution 1Recommended

Convert the Data Range into an Excel Table

Formatting your data range as an Excel Table is the most efficient and reliable way to ensure that formulas automatically extend to new rows as you type.

Excel Tables have a built-in feature called 'Calculated Columns'. When you enter a formula into one cell of a table column, Excel automatically applies that formula to the entire column. Furthermore, when you add a new row to the bottom of the table, the formula will automatically extend to the new row.

1
Select your data range

Highlight the range of cells containing your existing data, making sure to include your column headers.

2
Format as Table

Navigate to the 'Home' tab on the Excel ribbon, click on 'Format as Table', and choose your preferred visual style from the dropdown gallery.

3
Confirm table headers

A prompt will appear asking to confirm your data range. Ensure the 'My table has headers' checkbox is selected and click OK.

4
Enter the duration formula

Click on the first data cell in column D (or your target duration column), type your formula (e.g., =C2-B2), and press Enter. The formula will instantly populate down the entire column and automatically apply to any new rows you add.

Convert the Data Range into an Excel Table
Calculated Columns: As long as you enter data immediately beneath the last row of the table, Excel will automatically expand the table's boundaries and fill in the duration formula.
WPS Spreadsheet Solution

Automatically Calculate and Extend Formulas with WPS Spreadsheet

WPS Spreadsheet provides a seamless way to handle automated calculations. By utilizing its Smart Table features, your duration formulas will dynamically extend to new rows without repetitive manual dragging.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your workbook.
  2. 2. Format as Table: Select your data range, go to the Home tab, and click 'Format as Table' to enable smart data grouping.
  3. 3. Input the formula: Type your duration formula into the target column's top cell and press Enter.
  4. 4. Add new rows dynamically: Type new data in the row immediately below the table; WPS Spreadsheet will automatically copy the formula down.
Fully compatible with Microsoft Excel (.xls and .xlsx) formats and formulas.Smart Table functionality automatically extends formulas and formatting to newly added rows.Lightweight, fast, and free alternative for comprehensive data management.
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't my formula extending to new rows automatically in the table?

This usually occurs if the AutoCorrect option for calculated columns is disabled. To fix this, go to File > Options > Proofing > AutoCorrect Options. Click the 'AutoFormat As You Type' tab, and ensure the box for 'Fill formulas in tables to create calculated columns' is checked.

How do I correctly write a formula to calculate time duration?

To calculate a basic time duration, simply subtract the start time from the end time (e.g., =C2-B2, where C2 is the End Time). Ensure both the source cells and the result cell are formatted using a Time format or a Custom format like 'h:mm'.

Can I stop an Excel Table from automatically filling formulas?

Yes. Immediately after you enter a formula and press Enter, an AutoCorrect Options smart tag (a small lightning bolt icon) will appear next to the cell. Click it and select 'Stop Automatically Creating Calculated Columns'.