# Conditional Formatting with 3 cell

Solved/Closed
phillay - May 5, 2010 at 01:24 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 6, 2010 at 06:49 AM
Hi all

I want to do conditional formatting a cell but based on the criteria set by 2 other sells in the row

so if A1 = 0 and B1 > 0

i want C1 (or whatever cell) to say Yes or something?

what VBA can I use?

Related:

## 5 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 5, 2010 at 05:46 AM
I dont get it. Where is formatting involved in this. It seem that all you want is to have C1 populated based on A1 and B1

=IF(AND(A1=0, B1>0), "Yes", "No")
i feel like an idiot thanks alot for your help
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 5, 2010 at 06:24 PM
how do you know how an idiot feels like :P

You are welcome and thanks for being polite enough to post feedback. There are only few who take pains to do that and for that I thank you.
lol not the first time

anyways could i ask you another question?

i got the 2 cells A1 and B1

i want to populate C3 with a "yes" if they are BOTH >1 and a "no" if they are both = 0

Didn't find the answer you are looking for?

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 6, 2010 at 06:49 AM
First to teach you how to fish :)

if statement is like this

=IF(condition, show this when true, show this when false)

you can have up to 7 nested if

=IF(condition, true, IF(condition 2, true, false))
=IF(condition, if(condition 3, true, false), IF(condition 2, true, false))

for conditions you can use AND and OR if there are multiple condition
a1=5, and b4=10
=IF(AND(A1=5, b4=10), true, false)

a1=5 or b4 = 10
IF(OR(A1=5, b4=10), true and false)