Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Sheets IFS function with multiple AND operators

I’m trying to do a sheets function to look for a few different strings AND also check if another column is at least a minimum number.. I tried a few different variations of using IF, AND and IFS functions but cant get it working with multiple AND operators in the logical conditions.. The sheets functions are kinda weird and I just started using them.. There’s probably a better way but it’s only like 3 strings so this is fine too but they all evaluate to TRUE when one condition is not true like row 2 and 3..

I may have misunderstood this function, I thought it was like the following and returned the first true condition?

IFS(logical op, value, logical op, value..)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Here’s a link with test data (removed)

The function looks like this:

=IFS( A1 = "text" & B1 > 4, TRUE, A1 = "text2" & B1 > 4, TRUE, A1 = "text3" & B1 > 4, TRUE)

Thanks!

>Solution :

You need to use AND() function inside IFS(). Try-

=IFERROR(IFS(AND(A1="text",B1>4), TRUE,AND(A1="text2",B1>4),TRUE,AND(A1="text3",B1>4),TRUE),FALSE)

You can also use MAP() function to make it dynamic.

=MAP(A1:A3,B1:B3,LAMBDA(x,y,OR(x="text",x="text2",x="text3")*(y>4)))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading