ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If(And for Conditional Formating (https://www.excelbanter.com/excel-worksheet-functions/66043-if-conditional-formating.html)

Ronbo

If(And for Conditional Formating
 
1. Is it possible to add a "If(And function" to condition(1) in conditional
formating?

2. If so what is the syntax?

What I am using, but does not work (in all cases) is;
If(And(a1b1),(a1<100))

Using (what I believe to be the correct syntax) is not exceptable:
If(And(a1b1,a1<100))

Biff

If(And for Conditional Formating
 
Hi!

Try this:

=AND(A1B1,A1<100)

Here's another thing to think about that most people don't consider until
after they discover that it males a difference:

Empty cells!

=AND(A1<"",B1<"",A1B1,A1<100)

Biff

"Ronbo" wrote in message
...
1. Is it possible to add a "If(And function" to condition(1) in
conditional
formating?

2. If so what is the syntax?

What I am using, but does not work (in all cases) is;
If(And(a1b1),(a1<100))

Using (what I believe to be the correct syntax) is not exceptable:
If(And(a1b1,a1<100))




Ryan Poth

If(And for Conditional Formating
 
Ronbo,
You need to lose the "if" part of that formula. Conditional format formulae
should always resolve to true/false, so instead try:
=AND(A1B1,A1<100)

HTH,
Ryan

"Ronbo" wrote:

1. Is it possible to add a "If(And function" to condition(1) in conditional
formating?

2. If so what is the syntax?

What I am using, but does not work (in all cases) is;
If(And(a1b1),(a1<100))

Using (what I believe to be the correct syntax) is not exceptable:
If(And(a1b1,a1<100))


bpeltzer

If(And for Conditional Formating
 
Just use the AND to return TRUE when the condition should be applied...
=and((a1b1),(a1<100)).

"Ronbo" wrote:

1. Is it possible to add a "If(And function" to condition(1) in conditional
formating?

2. If so what is the syntax?

What I am using, but does not work (in all cases) is;
If(And(a1b1),(a1<100))

Using (what I believe to be the correct syntax) is not exceptable:
If(And(a1b1,a1<100))


wjohnson

If(And for Conditional Formating
 

Try this - The OK and Check can be replaced with any value you want for
the True and False part of the statement.
You might also try a try using an "OR" statement just replace the AND
with OR.

=IF(AND(A2B2,A2<100),"OK","Check")


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=502762



All times are GMT +1. The time now is 03:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com