Combining multiple conditions with ArrayFormula in Google Sheets

Hey everyone! I’m stuck on a Google Sheets problem. I’m trying to use ArrayFormula with multiple conditions but can’t get it to work. Here’s what I’ve tried:

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

This doesn’t seem to do the trick. I want to use more than two conditions in the AND part. Is there a way to make this work with ArrayFormula? I’ve also tried using OR instead of AND but no luck.

Any tips or tricks would be really helpful! I feel like I’m close but just missing something. Thanks in advance for any help you can give!

I’ve wrestled with this exact issue before, and it can be a real headache. The trick that finally worked for me was using the ARRAYFORMULA function in combination with multiplication for logical operations. Here’s what I ended up using:

=ARRAYFORMULA(IF((AG2:AG=“Yes”)(AI2:AI<>“”)[additional conditions], “Ok”, “Blank”))

You can keep adding more conditions by multiplying them together. Each condition should be in its own parentheses. This method effectively mimics the AND logic within an array context.

For OR logic, you’d use addition instead of multiplication. It’s a bit counterintuitive at first, but once you get the hang of it, it becomes second nature. Just remember: multiplication for AND, addition for OR when working with ARRAYFORMULA.

Hope this helps you out! Let me know if you need any clarification.

hey alexr1990, try this:

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

for multiple conditions, just keep multiplying em. ArrayFormula doesn’t play nice with AND/OR, so we use multiplication as a workaround. each condition in parentheses. hope this helps!

I’ve encountered similar challenges with ArrayFormula and multiple conditions. Here’s a solution that should work for you:

=ARRAYFORMULA(IF((AG2:AG=“Yes”)(AI2:AI<>“”)[your additional conditions here], “Ok”, “Blank”))

The key is to use multiplication (*) instead of AND for multiple conditions. Each condition should be in parentheses. This method allows you to add as many conditions as needed.

For OR logic, use addition (+) instead of multiplication. It’s a bit unintuitive at first, but it’s quite powerful once you get the hang of it.

Remember, ArrayFormula doesn’t work directly with AND/OR functions, so this approach is a reliable workaround. Let me know if you need further clarification on implementing this in your specific case.