![]() |
Combining AND, MID, and OR
I have a formula that works fine, written as:
=IF(AND(MAX(Q10:R10)=1,MID(A10,1,3)="ARU"),2,MAX(Q 10: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 |
Combining AND, MID, and OR
Here's Two ways:
=IF(AND(MAX(Q10:R10)=1,OR(MID(A10,1,3)="ARU",MID(A 10,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 -- "bquirk" wrote in message ... I have a formula that works fine, written as: =IF(AND(MAX(Q10:R10)=1,MID(A10,1,3)="ARU"),2,MAX(Q 10: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 |
Combining AND, MID, and OR
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 "bquirk" wrote: I have a formula that works fine, written as: =IF(AND(MAX(Q10:R10)=1,MID(A10,1,3)="ARU"),2,MAX(Q 10: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 |
All times are GMT +1. The time now is 02:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com