# Help with rules and commands

#### Toota

##### New Member
Hi there,
I have been lucky enough to get some answers previously and now have another one
Rule can only start when AF8<105 and J3<5but >3
Ok then we have commands LAY and GREEN
AK9>0 LAY when and if that happens then "IF AG9 is 10% < AI9 then GREEN" or "H4=0 GREEN"

Thanks i really love the way everyone helps one another.

### Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

#### jtakw

##### Well-known Member
Hi,

Try this:

Excel Formula:
``=IF(AND(AF8<105,J3>3,J3<5),IF(AK9>0,IF(OR(AG9<AI9*0.9,H4=0),"GREEN","LAY"),""))``

#### Toota

##### New Member
Hi,

Try this:

Excel Formula:
``=IF(AND(AF8<105,J3>3,J3<5),IF(AK9>0,IF(OR(AG9<AI9*0.9,H4=0),"GREEN","LAY"),""))``
Thankyou looks intersting love it

#### jtakw

##### Well-known Member
IF AG9 is 10% < AI9

I'm a bit unclear regarding this part, so you may need to change the < to <= like below:

=IF(AND(AF8<105,J3>3,J3<5),IF(AK9>0,IF(OR(AG9<=AI9*0.9,H4=0),"GREEN","LAY"),""))

#### Toota

##### New Member

Thanks ill try it

#### Toota

##### New Member
Jtakw i am getting error in status cell?

#### jtakw

##### Well-known Member

What is the error?
You may have numbers in cells that are actually Text.

#### Toota

##### New Member
Maybe my typing mistake ill get back to you tomorrow thanks so much

#### Toota

##### New Member
Thankyou looks intersting love it
All good just changed lay and green around

#### jtakw

##### Well-known Member
"IF AG9 is 10% < AI9 then GREEN" or "H4=0 GREEN"

That's not what your description says.

Replies
11
Views
213
Replies
42
Views
477
Replies
3
Views
102
Replies
1
Views
61
Replies
2
Views
148

1,127,611
Messages
5,625,833
Members
416,138
Latest member
Pizzaman22

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