The values come from the Expected and Actual columns in the worksheet.

The challenge is that the difference might be negative or positive, and we need to cater to both.

Note that some values are negative.

Excel formula: Get percent change

This formula uses theABS functionto convert the percentages in column D to positive numbers.

If the logical test returns TRUE, the difference is within 5% and IF returns “Yes”.

Otherwise, IF returns “No”.

Excel formula: Increase by percentage

Notice both results aretext valueswrapped in double quotes ("").

As the formula is copied down, we get a new result in each row.

If the value in G5 is changed to a new percentage, all results recalculate.

Excel formula: Forecast vs actual variance

More than one condition can be tested by nesting IF functions.

The IF…

ABS Function

The Excel ABS function returns the absolute value of a number.

ABS converts negative numbers to positive numbers, and positive numbers are unaffected.

Excel IF function

Excel ABS function