How to Use ARRAYFORMULA in Google Sheets?
Tired of copying formulas down every row? ARRAYFORMULA automates this process, saving you time and effort.
Formula Genius can generate a draft from a plain-English prompt. Supported formulas can be checked with sample cases; review the coverage on the result.
The formula
"Apply a formula to an entire column automatically without copying it into every row using ARRAYFORMULA"
=ARRAYFORMULA(A2:A + B2:B)
ARRAYFORMULA allows you to apply a function to an entire range of cells instead of a single cell.
Step-by-step breakdown
- Start with the ARRAYFORMULA function to indicate you're applying it to a range.
- Specify the range of cells you want to include, such as A2:A.
- Combine it with a function, like addition, to perform operations across the range.
- Close the parentheses to complete the formula.
Edge cases & warnings
- If the ranges have different lengths, ARRAYFORMULA will return an error.
- Using ARRAYFORMULA with non-numeric data types may lead to unexpected results.
- If the formula references empty cells, it may return blank results instead of zeros.
Examples
"A2:A = {1; 2; 3}, B2:B = {4; 5; 6}"
Returns {5; 7; 9}
"A2:A = {10; 20; 30}, B2:B = {1; 2; 3}"
Returns {11; 22; 33}
Frequently asked questions
Can I use ARRAYFORMULA with multiple functions?
Yes, you can combine ARRAYFORMULA with various functions like SUM, AVERAGE, etc.
What happens if I insert a new row?
The ARRAYFORMULA will automatically adjust to include the new row if it's within the specified range.
Is ARRAYFORMULA available in Excel?
No, ARRAYFORMULA is specific to Google Sheets; Excel has similar functions like dynamic arrays.
Can't find what you need?
Describe a formula in plain English. Formula Genius drafts and explains it, and can check supported formulas on sample cases.