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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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