Home » excel » excel – Looking at multiple values with one statement w/o OR statement

excel – Looking at multiple values with one statement w/o OR statement

Posted by: admin May 14, 2020 Leave a comment

Questions:

Say I have multiple tasks: quoting, binding, rating that have same response time of 3 hours… I was wondering if there was a way to make an IF statement such that I could just say for example:

=IF(B2="*Quoting,Binding,Rating", C2+3, NA)

I haven’t been able to get it to work, and I’m trying to avoid using an OR statement with the IF statement to get the values, but is it possible to do it this way? It sounds simple, “If it’s task x,y,z then add 3 hours to the start time column (C2)”. Any advice guys? Thanks!

How to&Answers:

This may achieve what you’re after

=IF(NOT(ISERROR(SEARCH(B2,"Quoting,Binding,Rating"))), C2+3, "NA")

Hope that helps

Answer:

Use the OR statement: =(IF(OR(B2=”Quoting”,B2=”Binding”,B2=”Rating”),C3+3,NA()))

If you’re looking to shorten the formula, you can put the values you want to check into a named range (I used “List” to reference “I:I” but you could put the list on another sheet) and use SUMPRODUCT.

=IF(SUMPRODUCT(–(B2=List))>0,C3+3,NA())