# IF logical test, value if true, value if false

#### steverpi75

##### New Member
I'm having a hard time writing an equation for this scenario:

For an error rate:

0.0 to 0.3 = 0.02 points

>0.3 to 0.6 = linear slope between .3 and .6

>0.6 = 0.0 points

This is the equation im using:

=IF(O3<=S3,0.02,IF(O3>S3,(R3-O3)/15,"0.00"))

Where:
O3= error rate value that I'm trying to score
S3=0.3
R3=0.6

The equation works until I have a number > 0.6 at which point I get negative numbers, which I don't want.

Thanks for the help.

### Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try this:

Code:
``=IF(O3<=S3,0.02,IF(O3<R3,(R3-O3)/15,0))``

Note that using "0.00" returns a text value. If that's what you want, then replace the ,0 at the end to ,"0.00" as before.

Replies
3
Views
384
Replies
2
Views
384
Replies
1
Views
1K
Replies
3
Views
614
Replies
5
Views
700

1,219,807
Messages
6,150,348
Members
450,952
Latest member
Zung

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