Formula Auto-Updating When Inserting Rows or Columns [Google Sheets]

Published on

Have you heard about the use of infinite ranges in formulas in Google Sheets? To make a formula auto-updating when inserting rows or columns, you must use infinite ranges.

Let’s see how to use infinite ranges in rows, columns, as well as in rows and columns together in Google Sheets.

Assume you have few numbers in the range A1: A10. How to find the total of these numbers?

We are using Google Sheets. So no need to pick the calculator. You can use the basic math function SUM for this.

In cell B1 you may enter the below formula, right?

=sum(A1:A10)

In this formula, we have only used finite ranges. So if you enter any value in cell A11, it won’t update in the formula.

See how to transform this formula to auto-include newly entered values in new rows.

How to Make a Formula Auto-updating When Inserting Rows or Columns in Google Sheets

Make a Formula Auto-updating When Inserting Rows

I am taking the just above SUM formula example. To make the above SUM formula covers an entire column use the range in the formula as below.

Infinite Ranges in Row:

=sum(A1:A)

This formula would cover the entire column A. So you can call it an auto-updating formula.

Make a Formula Auto-updating When Inserting Columns

You have already learned the SUM formula that auto-updates when inserting new rows. Here is column use.

Again I am using the SUM function. This time I have numbers in the cells A1, B1, C1, D1, and E1.

=sum(A1:E1)

This formula would return the total of the numbers in the said cells. This formula won’t update the result when you insert a new value in cell F1.

Similar to Row, you can make this formula auto-updating when inserting new Columns in Google Sheets.

Infinite Ranges in Column:

=sum(A1:1)

This way you can make a formula auto-updating when inserting rows or columns in Google Sheets.

Here is a different scenario. The above two examples show auto-updating formulas in rows/columns.

What about using infinite ranges column and rows in a single formula?

Formula That is Auto-updating When Inserting Rows or Columns

In the real sense, it’s not possible. But there is a workaround. To understand what I am trying to say please read on.

I have a Google Sheets (tab name Sheet1) with 1000 rows and 26 columns. But the rows and columns may increase in the future.

In the same sheet, in tab2 (tab name Sheet2) I want a formula to count the numbers in that whole Sheet. What would be the formula?

=sum(Sheet1!A1:1000)

This formula can auto-update infinite columns. But the rows are limited to 1000 rows. There are two options to make this formula auto-updating when inserting additional rows.

Either use a large number like 50,000 as the last row number. For example;

=sum(Sheet1!A1:50000)

Here is another option. Here instead of putting any large number, the COUNTA counts the values in the cell A1: A in Sheet1 and uses that value as the number of rows.

Since it’s an indirect range, you should use the INDIRECT function to convert it as a normal data range.

=sum(indirect("Sheet1!A1:"&counta(Sheet1!A1:A)))

If you don’t have blank cells in between in this range in A1: A, you can use this formula.

Follow the above tips to make a formula auto-updating when inserting Rows/Columns in Google Sheets.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

How to Extract Numbers from Text in Excel with Regex

You can use the REGEXEXTRACT or REGEXREPLACE functions to easily extract numbers from text...

Using OFFSET and MATCH Together in Google Sheets: Advanced Tips

One powerful and flexible way to look up values is by combining the OFFSET...

How to Use OFFSET and XMATCH Functions Together in Excel

We often use the OFFSET and XMATCH functions together to match a value in...

How to Calculate Maximum Drawdown in Excel and Google Sheets

You can use the following dynamic array formula to calculate maximum drawdown (MDD) in...

More like this

Using OFFSET and MATCH Together in Google Sheets: Advanced Tips

One powerful and flexible way to look up values is by combining the OFFSET...

Running Count with Structured References in Google Sheets

Running a count with structured references is achievable in Google Sheets tables using the...

Running Total with Structured Table References in Google Sheets

You can use two types of formulas to create a running total with structured...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.