# Value is within tolerance

Inside the IF function, the expected value is subtracted from the measured or actual value. The result may be positive or negative, depending on the actual value, so the ABS function is used to convert the result to a positive number in all cases. This number is then compared to the allowed tolerance as a logical test inside IF. If the difference is less than or equal to the allowed tolerance, IF returns "OK". If not, IF returns "Fail". These messages can be customized as needed.

## Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

## Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.