Infinite Row Reference Horizontally in Google Sheets

Published on

Similar to columns, which is widely popular, we can use infinite row reference horizontally in Google Sheets. I find it very useful in a few instances in Google Sheets.

Entire column and entire row may be sometimes quite confusing for Google Sheets users. That’s why I have included the word “Horizontally” in the title.

The entire column here means entire cells in a column. That entire cells are actually different rows.

The entire row here means entire cells in a row. In that, each cell is in different columns.

A1, A2, A3 … is an example to an entire column. In formulas, you can refer entire columns as below.

Infinite Column Reference Vertically in Sheets

In Google Sheets how to use infinite row reference in formulas?

Infinite Row Reference in Google Sheets Formulas

To include infinite row reference in formula use the reference as below.

Infinite Row Reference in Google Sheets

To include multiple rows in infinite row reference you can follow the below method. Here the formula covers the first five rows infinitely.

=A1:5

What’s the Benefit of Using Infinite Row Reference in Google Sheets

When you import an entire spreadsheet using Importrange, use infinite row reference. This can ensure that the imported table accommodates future changes in the source table like the addition of new columns.

Infinite Rows in Importrange:

In my source data, in Sheet1, I have maximum columns in the Sheet is 26 (A to Z) and rows are 1000. In that, I have data in the range A1:T7.

You can import the range A1:T7 as below.

=importrange("Enter your source file URL","Sheet1!A1:T7")

Change the reference to “Sheet1!A1:1000” so that you can ensure that all the new columns in the source are getting imported.

Warning: This can slowdown the performance of your Spreadsheet.

Infinite Row Reference in Hlookup:

Another example is with Hlookup. If you have a growing number of columns like one column each for each date, then use the Hlookup as below.

infinite rows in Hlookup

Infinite Row Ranges in Expanding Formula:

Before winding up this tutorial, here is one more example.

It’s common to use Isblank or IF+Len combo to control expanding formulas in columns. Can we use any of these formulas in infinite rows?

Yes. Here is that example.

The below formula populates the sequential numbers in an entire row but up to the column that contains values in the second row.

=ArrayFormula(if(len(A2:2),column(A2:2),))
limit up to the last column with value

Conclusion

In addition to the above formula examples, you can find Infinite Row Reference useful in functions like Query, Index, Match etc.

That’s all for now! Hope you have enjoyed the stay.

Related Reading:

  1. How to Flip a Column in Google Sheets – Finite and Infinite Columns.
  2. Google Sheets: Countifs with Not Equal to in Infinite Ranges.
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.

Highlight Upcoming Birthdays in Google Sheets

When highlighting upcoming birthdays in Google Sheets, one important aspect is ignoring the year...

Compare Two Tables for Differences in Excel

To compare two tables with similar data for differences, you can use the XLOOKUP...

Calculate Weighted Average in Pivot Table in Google Sheets

You can calculate a weighted average in a Pivot Table using a custom formula...

Summarize Data and Keep the Last Record in Google Sheets

In Google Sheets, we can summarize data (like sum, average, min, max, count) using...

More like this

Highlight Upcoming Birthdays in Google Sheets

When highlighting upcoming birthdays in Google Sheets, one important aspect is ignoring the year...

Calculate Weighted Average in Pivot Table in Google Sheets

You can calculate a weighted average in a Pivot Table using a custom formula...

Summarize Data and Keep the Last Record in Google Sheets

In Google Sheets, we can summarize data (like sum, average, min, max, count) using...

6 COMMENTS

  1. Hi,

    I have the days in columns in one sheet and another sheet I have to select the Monday to Friday cell range manually, is there any formula to drag horizontally so that can auto-update the cell reference range or number

    If I drag horizontally am getting the

    =SUM(Raw!IN2:IQ2)

    =SUM(Raw!IO2:IR2) instead I need to get next five cells means from IR2:IV2

    =SUM(Raw!IP2:IS2) instead I need to get next five cells means from IW2:IZ2

    Example :

    =sum(Raw!B2:D2) (adding five working days date range)

    =sum(Raw!E2:I2)

    =sum(Raw!J2:M2)

    • For me, that is possible with a helper row.

      For example, my values are in B2:2.

      In B3 I will use this array formula and then hide the row.

      =ArrayFormula(if(len(B2:2),sequence(1,columns(B2:2),0,4),))

      The below formula is for cell B4. Drag to the right to sum after offsetting 5 columns each.

      =sum(offset(B2:2,0,B3,1,5))

      If you want any additional info, please let me know. I’ll try to explain it by writing a post.

      Best,

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.