How to have 2 trues for IF function

I am trying to use the IF function to return a value from a 2nd cell but I want to have the if-expression return true if either of 2 different values are present


eg

=IF(A2=4,B2," ")

But I want the 4 in the expression to be 4 or 5


How do I phrase that?

Posted on Mar 3, 2025 11:06 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 3, 2025 11:15 AM

Use:


=IF(OR(A2=4,A2=5),B2,"")


(259108)

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to have 2 trues for IF function

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.