# Conditional Formula

#### theatreking

##### New Member
Hi,
Was hoping to get a little help in getting this formula correct.

I can get it to work when entering this - =IF(AND(P5<J5,(J5/2)<O5),"G","R")

But as soon as I add another - =IF(AND(J4>100,"Y"),P4<J4,(J4/2)<O4),"G","R") I get an error.

Do I have it the wrong way around or do I have to use a OR statement?

Cheers!

Last edited:

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).

#### Cosmic Wizard

##### Board Regular
Hi,
Was hoping to get a little help in getting this formula correct.

I can get it to work when entering this - =IF(AND(P5<j5,(j5 2)<o5),"g","r")

But as soon as I add another - =IF(AND(J4>100,"Y"),P4<j4,(j4 2)<o4),"g","r")="" i="" get="" an="" error.

Do I have it the wrong way around or do I have to use a OR statement?

Cheers!

Have you tried several formulas??
Not sure what you are trying to do, perhaps a longer explanation would help.

Also check out this video Conditional formatting - highlight entire row based on a cell value, I found the example a huge help!</j4,(j4></j5,(j5>

#### theatreking

##### New Member
Thanks for the Video, but IM not struggling with the conditional formatting, it more the formula to make it work -

IF(AND(P <J1 ,(J1 /2)<O5),"G","R"), just need to have it change to "Y" also if greater than 100?

Replies
21
Views
503
Replies
1
Views
171
Replies
2
Views
1K
Replies
3
Views
238
Replies
15
Views
239

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,706
Messages
5,833,238
Members
430,199
Latest member
Petty queen

### 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.

### Which adblocker are you using?

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

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