Combining AND, MID, and OR

  • Thread starter Thread starter bquirk
  • Start date Start date
B

bquirk

I have a formula that works fine, written as:

=IF(AND(MAX(Q10:R10)=1,MID(A10,1,3)="ARU"),2,MAX(Q10:R10))

My problem, though, is that I want to check cell A10 for other
possibilities besides"ARU". Let's say I also want to check for "CON"
and "TUF". How do I add these other possibilites to the formula? The
OR function has thrown me for a loop!

Thanks, Brendan
 
Here's Two ways:

=IF(AND(MAX(Q10:R10)=1,OR(MID(A10,1,3)="ARU",MID(A10,1,3)="CON",MID(A10,1,3)="TUF")),2,MAX(Q10:R10))

Or even shorter (less long):

=IF(AND(MAX(Q10:R10)=1,OR(MID(A10,1,3)={"ARU","CON","TUF"})),2,MAX(Q10:R10))

HTH,
Paul
 
Perhaps this:

=IF((MAX(Q10:R10)*OR(LEFT(A10,3)={"ARU","CON","TUF"}))=1,2,MAX(Q10:R10))

Is that something you can work with?

***********
Regards,
Ron

XL2003, WinXP
 
Back
Top