Help with IF / And / OR

jas64

New Member
Joined
Apr 30, 2018
Messages
9
I am not sure that I'm using the most efficient approach to what I'm trying to achieve. Input and advice is most welcome. I'm sure this is a simple formula, but I'm not having and success with it.

IF(AND( A1 > 9, and < 20, and B1 = "PHONE"), (DO THIS)

<tbody>
</tbody>
-OR-

<tbody>
</tbody>
IF(AND( A1 > 20, and B1 = "PHONE"), (DO THIS)

<tbody>
</tbody>
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
try this out just replace the DO THIS with what you want

=IF(AND(A1>9,A1<20,B1="PHONE"),DO THIS,IF(AND(A1>20,B1="PHONE"),DO THIS,""))
 
Upvote 0
Is this on the right track? :

PHP:
=IF(AND(A1>9,A1<20,B1="PHONE"),"DO THIS IF 9 to 20",IF(AND(A1>20,B1="PHONE"),"DO THIS IF over 20","BOTH CONDITIONS FALSE"))

BTW, you may want to decide which category you want if A1 is exactly 20. With this formula, as it is now, if A1 = 20, both cond would be false.
 
Last edited:
Upvote 0
Thanks! That works. I swore that I tried that, but I'm thinking I misused a parentheses.
 
Upvote 0
Hi,

How about this slightly shorter version, assumes - DO THAT if > 9 and <= 20


Book1
ABC
120PHONEDO THAT
Sheet66
Cell Formulas
RangeFormula
C1=IF(B1="PHONE",IF(A1>20,"DO THIS",IF(A1>9,"DO THAT","A1 is less than 10")),"B1 is Not PHONE")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top