Do not use AND/OR with ARRAYFORMULA, use + instead of OR and * instead of AND with IF

Try

=ArrayFormula(if((AG2:AG="Yes")*(AI2:AI<>""),"Ok","Blank"))

You can add other conditions if you respect the syntax with + or *

Answer from Mike Steelson on Stack Overflow
🌐
Reddit
reddit.com › r/googlesheets › array formula for if/or statement?
r/googlesheets on Reddit: Array formula for if/or statement?
June 13, 2022 -

Hello,

I have the following function =IF(OR(E2>=18,F2>=20),1,"") ideally I would like this to be an arraryformula so I don't have to make sure it is hitting all the data when I update, there may be more rows added when updating. Any ideas on what I can do differently to make this more automated? Currently, I just drag down the function as more data is added, however, someone else will be helping load data now and I would like to avoid any human error.

🌐
Google Support
support.google.com › docs › answer › 3093275
ARRAYFORMULA - Google Docs Editors Help
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. Sample Usage ARRAYFORMULA(SUM(IF(A1:A10>5, A1:A10, 0
People also ask

What Is the Inside Content of an ARRAYFORMULA Function?
The inside content of an ARRAYFORMULA function typically includes the desired calculation or operation, enclosed within the function's parentheses.
🌐
owox.com
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
How to Use the ARRAY FORMULA Function in Google Sheets?
To use the ARRAYFORMULA function, start with =ARRAYFORMULA(), and inside the parentheses, enter the desired calculation or operation to apply it across a range of cells or data.
🌐
owox.com
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
What Is an Array Formula in Google Sheets?
An array formula in Google Sheets is a single formula that can perform calculations or operations on multiple cells or an entire range, simplifying complex data tasks.
🌐
owox.com
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
🌐
Google Support
support.google.com › docs › thread › 130780453 › if-and-with-arrayformula-function
IF AND with Arrayformula function - Google Docs Editors Community
October 14, 2021 - Skip to main content · Google Docs Editors Help · Sign in · Google Help · Help Center · Community · Google Docs Editors · Terms of Service · Submit feedback · Send feedback on
🌐
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 - This post takes you through the basics of array formulas in Google Sheets, with example calculations and a worksheet you can copy.
🌐
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 - However, as we mentioned before, ARRAYFORMULA can be used with non-array functions, for example, IF, SUMIF, COUNTIF, VLOOKUP, and others. We’ll check out how they work below, but first, let’s get some datasets that we can use as examples. No need to copy and paste data since it’s not efficient and time-consuming. Instead, we can use Coupler.io, a reporting automation solution to automate exports from 50+ sources to Google Sheets.
Find elsewhere
🌐
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 - In this section, we’ll explore ... problems efficiently. When we use the IF function in ARRAYFORMULA, it allows us to do conditional data operations....
🌐
MakeUseOf
makeuseof.com › home › productivity › how to use the arrayformula function in google sheets
How to Use the ARRAYFORMULA Function in Google Sheets
June 3, 2022 - Write the initial ARRAYFORMULA statement here, which is ARRAYFORMULA(. Move to the end of the formula and add an extra bracket. Press Enter to execute the formula. The formula will execute it in all the selected cells in just one instance. This would work with other IF statements like SUMIF in Google Sheets too.
🌐
Google Sheets
sheetsformarketers.com › home › learn google sheets: 18 google sheets formulas for marketing › how to use arrayformula in google sheets
How To Use ARRAYFORMULA in Google Sheets (+ Examples)
February 3, 2021 - Because you can wrap most formulas in an ARRAYFORMULA, it’s really useful for speeding up marketing work in spreadsheets! For example, say you have a list of keywords and their ranking position. You want to categorise these to show you keywords that are ranking in positions 1 – 10 in the SERPs. ... This IF formula will look at the ranking positions (COLUMN B) and label them “Top 10” if they are in position 1 – 10 and “Nope” if they are beyond the top 10.
🌐
InfoInspired
infoinspired.com › home › google docs › spreadsheet › how to use if, and, and or with arrays in google sheets
How to Use IF, AND, and OR with Arrays in Google Sheets
June 5, 2024 - Combining data in Google Sheets can mean different things depending on how your data... ... Thanks for your valuable feedback. Happy New Year 2023 – may you have good health, experiences, and company. ... Any advice for getting this ARRAY to work? The formula works, but the ARRAY cannot be used with AND/OR as you’ve described. =ARRAYFORMULA(IF(OR(ISBLANK(B2),ISBLANK(C2),ISBLANK(E2), ISBLANK(G2),ISBLANK(H2)),0,1))
🌐
Coefficient
coefficient.io › home
How to Use the ArrayFormula Function in Google Sheets
September 2, 2025 - To resolve this, you’ll need to tell Google Sheets you want the formula to be an ArrayFormula. ... The formula now works. Note: Array formulas only work if the two array sizes match.
🌐
Google Sheets
sheets-pratique.com › en › functions › arrayformula
Google Sheets Function: ARRAYFORMULA
To do this, enter the ARRAYFORMULA function then A2+B2 and replace the cell references with the entire ranges A2:A9+B2:B9. ... The formula (entered only in cell C2) will then return the result of the addition for each pair of numbers: In the ...
🌐
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 - If you’re using CONCATENATE, you’ll need to type the text or cell references you want to combine. For example, to combine Value 1 and Value 2, you would type =CONCATENATE(‘Value 1’, ‘Value 2’) to display Value 1Value 2 as the result. Read more: Google Sheets vs. Excel: What’s the Difference? Close the formula by adding a closing parenthesis ) at the end. The complete formula should look something like this: =ARRAYFORMULA(G2:G14*H2:H14)
🌐
Form Approvals
formapprovals.com › home › how to use arrayformula in google sheets™ with google forms™
How to Use ARRAYFORMULA in Google Sheets™ with Google Forms™ | Form Approvals
March 30, 2026 - To set up a basic Total field that sums the values in two columns (column L and column N), your array formula would be =ARRAYFORMULA(L2:L+N2:N). For Row 2, this will calculate the sum of L2 and N2.
🌐
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 guide, you will learn about ... as well as how to combine it with other Google Sheets built-in functions. You have step-by-step instructions on how to use the ARRAYFORMULA function with the SUMIF, VLOOKUP, and IF functions....
🌐
Spreadsheet Class
spreadsheetclass.com › home › google sheets formulas › arrayformula & 5 ways to apply a formula to an entire column in google sheets
ARRAYFORMULA & 5 ways to apply a formula to an entire column in Google Sheets
April 23, 2026 - Hold “Ctrl” + “Shift” on the keyboard at the same time, and press “Enter”. Google Sheets will apply the ARRAYFORMULA function to your formula (i.e. the ARRAYFORMULA function will be “wrapped” around your original formula) Check ...
🌐
Excel Insider
excelinsider.com › home › google sheets › arrayformula function in google sheets
ARRAYFORMULA Function in Google Sheets - Excel Insider
December 5, 2025 - In this part, we will use these functions to extract specific data and pull data from another sheet. To extract specific data using ARRAYFORMULA with INDEX and MATCH functions, we will use the same dataset. Here, we will look up the Sales figures for a selected list of Employees listed in column H. ➤ Select the cell where you want the first result (I2), put the following formula, and hit ENTER. =ARRAYFORMULA(IF(H2:H="","",MAP(H2:H,LAMBDA(sales,IFERROR(INDEX(C2:C,MATCH(sales,A2:A,0)))))))