I tried using ARRAYFORMULA using whole columns (e.g. A:A, B:B, etc.) but if it's a formula where I need a result output to each row

you can always freeze it like:

=INDIRECT("A:A")

this way you can add rows anywhere you want (if you of course not add new row above the row that holds the formula - that would be troublesome to fit in A:A into A2:A)


that the INDEX function just does not work with ARRAYFORMULA at all

INDEX is already ARRAYFORMULA type of formula. the analogy being here as: you need a car to get from A to B where INDEX is a blue car with 3 doors and ARRAYFORMULA is a red car with 5 doors - it doesn't matter what color you have, you just need a car


= IF (G2 <> G1, 0, B1 + 1)

while this is direct logic there are several ways how to achieve the same thing. proper usage would require not to use such formulas as ARRAYFORMULA in column G or B to avoid circular dependency errors. for a simple resetting count up try:

=ARRAYFORMULA(COUNTIFS(B1:B7, B1:B7, 
 SEQUENCE(ROWS(B1:B7)),"<="&SEQUENCE(ROWS(B1:B7))))

feel free to change B1:B7 to open range or frozen range...


update:

=INDEX(IF(B2:B="";; COUNTIFS(B2:B; B2:B; 
 SEQUENCE(ROWS(B2:B)); "<="&SEQUENCE(ROWS(B2:B)))-1))

Answer from player0 on Stack Overflow
🌐
Coupler.io Blog
blog.coupler.io › home › the complete guide to using arrayformula in google sheets for all
Google Sheets ARRAYFORMULA With Examples | Coupler.io Blog
October 14, 2025 - To use it in Google Sheets, you can either directly type “ARRAYFORMULA” or hit a Ctrl+Shift+Enter Google Sheets shortcut (Cmd + Shift + Enter on a Mac), while your cursor is in the formula bar to make a formula an array formula (Google Sheets ...
Discussions

arrays - How to use an ARRAYFORMULA in Google Sheets that references cells in the same column - Stack Overflow
After getting sick and tired of having to copy formulas back into my sheet anytime I needed to add a row (one of my gripes of Google Sheets where Excel is much better). I've decided to try using More on stackoverflow.com
🌐 stackoverflow.com
Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts
But first, let’s have some introductions about arrayformula, for those who has not used this before in Google Sheets, some equivalents in Glide and some good practices while using it. I hope it can help you in building your Glide apps as well as applying it in your normal day job. More on community.glideapps.com
🌐 community.glideapps.com
19
49
May 25, 2020
ArrayFormula and "AND" Formula in Google Sheets - Stack Overflow
In Google Sheets, when using ArrayFormula with AND formula, I don't get the results as it should be. A B 6 7 In C1 I put formula as: =and(A1>5,B1>6) then I get True. If in D1 I put formula as: = More on stackoverflow.com
🌐 stackoverflow.com
How to do array formula?
try this in an empty column -- like E35 =ARRAYFORMULA( IF(ISBLANK(B35:B),, COUNTIFS( B35:B,B35:B, ROW(B35:B),"<="&ROW(B35:B)))) is this what you're trying to do? More on reddit.com
🌐 r/sheets
11
3
June 30, 2023
🌐
Ben Collins
benlcollins.com › home › how do array formulas work in google sheets?
How do array formulas work in Google Sheets? Get the lowdown here.
June 20, 2024 - Either type in the word ArrayFormula and add an opening/closing brackets to wrap your formula, or, more easily, just hit Ctrl + Shift + Enter (Cmd + Shift + Enter on a Mac) and Google Sheets will add ...
🌐
YouTube
youtube.com › watch
Google Sheets - Use ARRAYFORMULA Instead of Repeating Functions - YouTube
The ARRAYFORMULA allows you to replace a series of formulas with just one. The function works with ranges instead of single cells.🕒 Timestamps:0:00 The Simp...
Published: January 16, 2021
🌐
Coursera
coursera.org › coursera articles › data › data analytics › how to use the array formula in google sheets
How to Use the Array Formula in Google Sheets | Coursera
November 26, 2025 - With array formulas, you can perform advanced operations that are impossible with standard formulas. You might use an array to compute a singular value from a string of operations or go line by line to output a new collection of values. Google Sheets offers a convenient array formula with the syntax ARRAYFORMULA(array_formula).
Top answer
1 of 3
2

I tried using ARRAYFORMULA using whole columns (e.g. A:A, B:B, etc.) but if it's a formula where I need a result output to each row

you can always freeze it like:

=INDIRECT("A:A")

this way you can add rows anywhere you want (if you of course not add new row above the row that holds the formula - that would be troublesome to fit in A:A into A2:A)


that the INDEX function just does not work with ARRAYFORMULA at all

INDEX is already ARRAYFORMULA type of formula. the analogy being here as: you need a car to get from A to B where INDEX is a blue car with 3 doors and ARRAYFORMULA is a red car with 5 doors - it doesn't matter what color you have, you just need a car


= IF (G2 <> G1, 0, B1 + 1)

while this is direct logic there are several ways how to achieve the same thing. proper usage would require not to use such formulas as ARRAYFORMULA in column G or B to avoid circular dependency errors. for a simple resetting count up try:

=ARRAYFORMULA(COUNTIFS(B1:B7, B1:B7, 
 SEQUENCE(ROWS(B1:B7)),"<="&SEQUENCE(ROWS(B1:B7))))

feel free to change B1:B7 to open range or frozen range...


update:

=INDEX(IF(B2:B="";; COUNTIFS(B2:B; B2:B; 
 SEQUENCE(ROWS(B2:B)); "<="&SEQUENCE(ROWS(B2:B)))-1))

2 of 3
0

You should use the INDEX function with MATCH instead of INDIRECT in your ARRAYFORMULA For example, if your data is in the range A1:A11 , and you want to retrieve the value at row 5 through INDIRECT , you would use: =INDIRECT("A" & 5) If you want to retrieve the value at row 5 through INDEX , you would use: =INDEX(A:A, 5) Now, if you want to use the INDEX function with ARRAYFORMULA , you will need to use the MATCH function to find the row number of the value you want, since INDEX only takes a row number as its second argument. For example, if you want to retrieve the value at row 5 through ARRAYFORMULA and INDEX/MATCH , you would use: =ARRAYFORMULA(INDEX(A:A, MATCH(5, ROW(A:A)))) This formula will return the value in A5

Note: In your example, you're trying to match $G2 with G1 . If you want to match $G2 with G3 , you would use: =ARRAYFORMULA(INDEX(A:A, MATCH(G1:$G3))) This formula will return the value from A1 , A2 , or A3 depending on the value of $G2

Find elsewhere
🌐
Glide Community
community.glideapps.com › ask for help
Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts - Ask for Help - Glide Community
May 25, 2020 - Hi, Today I will show you the script that can make copying formulas down work, when it does not work with arrayformula. But first, let’s have some introductions about arrayformula, for those who has not used this before in Google Sheets, some equivalents in Glide and some good practices while using it.
🌐
Excel Insider
excelinsider.com › home › our blog › google sheets functions › 13 examples with arrayformula in google sheets
13 Examples with ARRAYFORMULA in Google Sheets - Excel Insider
October 8, 2025 - Discover 13 powerful ARRAYFORMULA examples in Google Sheets to simplify formulas, automate tasks, and boost your spreadsheet skills.
Top answer
1 of 4
146

AND doesn't work that way with Array formulae because it ANDs the whole array together in the top left cell, regardless of number of dimensions.

I.e. it checks if "">"" which is FALSE, ANDed with anything it will return FALSE for the top left cell, that result is carried down.

You can use multiplication of truth values to create ANDing that works with ARRAYFORMULA like this:

=ArrayFormula((A1:A>1)*(B1:B>6) = 1)

The OR equivalent would obviously be

=ArrayFormula((A1:A>1)+(B1:B>6) > 0)
2 of 4
12
Take this formula for instance:
=ARRAYFORMULA(IF(ISNUMBER(G3:G),IF(AND( G3:G>=7.5,G3:G<=8),"Full Day",IF(AND(G3:G>8,G3:G<24) ,"Full Day+",IF(AND(G3<7.5,G3>=4),"Half Day",IF(G3<4,"Short Leave",)))),))

Since you use the ARRAYFORMULA function you should use * instead of the AND function.

=ARRAYFORMULA(IF(ISNUMBER(A3:A),IF((A3:A>=7.5)*(A3:A<=8),"Full Day",IF((A3:A>8)*(A3:A<24) ,"Full Day+",IF((A3<7.5)*(A3>=4),"Half Day",IF(A3<4,"Short Leave",)))),))

When using the ARRAYFORMULA function you should use * instead of the AND function and + instead of the OR function.


Explanation

I don't recall an official site about this right now. In any case.

Point 1
Within an arrayformula, AND gives a single value. Not an array of TRUE/FALSE.

Point 2
You must also remember that in "math language", TRUE=1 and FALSE=0

Meaning

+----------+--------+
| Formula  | Result |
+----------+--------+
| =TRUE+2  |      3 |
| =FALSE+2 |      2 |
+----------+--------+

As you can see one can interchange between boolean TRUE/FALSE and 1/0 numbers.

Point 3
About the AND function

The AND function returns true if all the provided arguments are logically true and false if any of the provided arguments are logically false.

Putting it all together
In an arrayformula, instead of using AND/OR when making comparisons, we take advantage of the above information.

So, the "multiplication" (A3:A>=7.5)*(A3:A<=8) will return 1 (meaning TRUE) only if both sides return TRUE. All other conditions return 0 (meaning FALSE).
This is the exact behaviour of the AND function and does work in an ARRAYFORMULA.

About the OR function

The OR function returns true if any of the provided arguments are logically true and false if all of the provided arguments are logically false.

The same logic is applied within the arrayformula, when using + ("addition") instead of the OR function.

🌐
LiveFlow
liveflow.com › product-guides › arrayformula-in-google-sheets
ARRAYFORMULA Function in Google Sheets: Explained | LiveFlow
... Google’s explanation about the function of the ARRAYFORMULA is as follows: the ARRAYFORMULA Enables the display of values returned from an array formula into multiple rows and/or columns and the use of non-array functions with arrays.
🌐
Google Sheets
sheets-pratique.com › en › functions › arrayformula
Google Sheets Function: ARRAYFORMULA
The ARRAYFORMULA function allows displaying values from an array formula across multiple rows and/or columns, and to use with arrays functions that do not support them.
🌐
Reddit
reddit.com › r/sheets › how to do array formula?
r/sheets on Reddit: How to do array formula?
June 30, 2023 -

I have a sheet listing names with categories. Every time I start a new category, I need the numbering to start from one. I have a code that works well, but I have to copy paste the code every time I add a new row. I'm quite new to google sheets and just found out about ARRAYFORMULA.

This is my current formula:

=IF(B35 = B34, C34+1, "")

  • Column B has the category names (they are always in order...like same category goes in adjacent rows)

  • Column C has the numbering.

  • The formula pasted here is for cell C35.

I already tried with this, but it gives an error.

=ArrayFormula(IF(B35:B = B34:B, C34:C+1, ""))

How do I convert this into ARRAYFORMULA?

Any help would be appreciated.

🌐
Reddit
reddit.com › r/googlesheets › does arrayformula lighten the calculation load on a sheet or is it the same amount of calculation/processing load as individual cell formulae?
r/googlesheets on Reddit: Does ARRAYFORMULA lighten the calculation load on a Sheet or is it the same amount of calculation/processing load as individual cell formulae?
January 2, 2020 -

I basically got handed a Sheet from the previous person in my role and I immediately noticed that every cell in this table has a formula tied to it, and for the most part it is the same formula but diff cell reference. What I'm thinking is to just replace the formulas with an ARRAYFORMULA at the top of the column but realistically does this actually lighten the load times of the Sheet? I'm having trouble finding documentation on how a Google Sheet actually performs calculations. The goal right now is to lighten up the Sheet so that we can reduce load times, since the Sheet currently is jampacked with tons of IMPORTRANGES and each cell references another cell, which references another cell, and so on.

🌐
Layer
golayer.io › home › how to use google sheets arrayformula (+ examples)
How to Use Google Sheets ARRAYFORMULA (+ Examples) | Layer Blog
September 23, 2024 - In this example, I want to multiply ... Sheets to the spreadsheet with your data. In an empty cell, type the equal sign followed by the column of cells containing the quantities....
🌐
Zapier
community.zapier.com › home › learn and share › featured articles › creating google sheets rows with array formulas
Creating Google Sheets Rows with Array Formulas | Zapier Community
October 27, 2021 - The Google Sheets Array Formula is a powerful 3rd option. The Sheets ARRAYFORMULA() function enables us to enter the formula in Row 2 of the Sheet - and have that formula apply to any New Rows added to the Sheet.
🌐
Reddit
reddit.com › r/googlesheets › array formula use with google forms/sheets
r/googlesheets on Reddit: Array Formula use with Google Forms/Sheets
May 16, 2023 -

Hi all. I am sure this has been asked a hundred times over, but I just can't seem to work it out.
I have two sets of numerical choice questions in a google form. That then populates a sheet. I then would like to add a formula to auto populate the totals of both sets of questions into two totals. Now setting the formula's individually in each row doesn't work because once the form adds new results it wipes the formulas, so I have seen that there is a way to add this via "Array formula" in the header column. However, my cludgy attempt to do this doesn't seem to work. Where am I going wrong?
I have attached screenshots of the spreadsheet with the two columns highlighted so you can see the formula I have created so far.
Thanks so much for reading and helping. Apologies again for the undoubtedly repeated question.

Screenshot 1

Screenshot 2

🌐
Owox
owox.com › blog › articles › google sheets tips › mastering arrayformula in google sheets: a complete guide
Complete Guide to Master Array Formulas in Google Sheets for 2025
May 25, 2026 - ARRAYFORMULA(...): This is used to enable the processing of the entire range of cells as an array. This is necessary because normally, SUMIF doesn't handle array operations natively.
🌐
Glide Community
community.glideapps.com › ask for help
Google Sheets and ARRAYFORMULA - Ask for Help - Glide Community
October 12, 2022 - I know ARRAYFORMULA is out of favor at the moment, and that’s great. Because it seems to me there’s a fundamental problem with it: namely, the ARRAYFORMULA itself exists in a row of your data. If that row gets deleted, your ARRAYFORMULA is gone. (I’ve tried it.)