Combining AND, MID, and OR

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
 
P

PCLIVE

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
 
R

Ron Coderre

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top