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.

[TABLE="width: 515"]
<tbody>[TR]
[TD="class: xl69, width: 515"]IF(AND( A1 > 9, and < 20, and B1 = "PHONE"), (DO THIS)[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 515"]
<tbody>[TR]
[TD="class: xl71, width: 515"] -OR-[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 515"]
<tbody>[TR]
[TD="class: xl71, width: 515"]IF(AND( A1 > 20, and B1 = "PHONE"), (DO THIS)[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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
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,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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