Compare values with tolerance

alombia

Board Regular
Joined
Jan 14, 2016
Messages
89
Hi,

I have the following formula to compare tow values: =IF(BO4="","",IF(BO4<$BL4,"Poor",IF(BO4=$BL4,"Good",IF(BO4>$BL4,"Very Good"))))
As an example, BO4 is 1.5 and BL4 is 2.

However, I would like to compare the two values but with a tolerance of 0.5. In others, If BO4 is is with 0.5 of BL4, then 'Good'; less than that is 'Poor' and above that is "Very Good".

Your help is very much appreciated.
Thanks.
 
Hi,
That would for me in some circumstances. However, ideally i need it to be tolerance both ways, i.e. 0.5 below or above.
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
No, this simply returns 'poor' instead of 'very good'. Otherwise, it works as far as case 4 is concerned.
 
Upvote 0
I Don't understand ....case 4 is good and not very good

BL4 (Target)BO4 (Actual)Result
22Good
21.5Good
21.4Poor
22.1Good

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
I Don't understand ....case 4 is good and not very good

BL4 (Target)BO4 (Actual)Result
22Good
21.5Good
21.4Poor
22.1Good

<tbody>
</tbody>

Yes, the above works. But with the new formula there is no 'Very Good'. Suppose case 5 is BO4 is 3. It returns 'poor'! In every case where BL4-BO4 is over 0.5, it returns 'poor' instead of 'Very Good'.
 
Last edited:
Upvote 0
I think I got you :)

=LOOKUP(BL4-BO4,{-15,-0.5,0,0.51},{"Very Good","Good","Good","Poor"})

Fantastic! It works brilliantly. Thank you.

Now, help me understand the values (-15,-0.5,0,0.51) so that I can try and make it dynamic. In other others, I want to put 0.5 in a cell and simply reference that cell so I can change the tolerance as i need. For example, 1 instead of 0.5 etc.
Once again, thanks for your patience and support.
 
Upvote 0
You are welcome.

When I started to explain to you, I noticed that the formula could be improved a bit ...

=LOOKUP(BL4-BO4,{-15,-0.5,0.51},{"Very Good","Good","Poor"})

The formula checks the difference between BL4 and BO4 :

Any value between +0.5 and -0.5 = good (ie -0.2 , 0 , 0.4 etc')
Above +0.5 = poor
Below -0.51 = Very good

Thank you for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,598
Members
449,109
Latest member
Sebas8956

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top