Excel percent error function
Is there a function in excel where i can calculate the percent error.
- ElmyrLv 71 decade agoFavorite Answer
There's no formula for it in Excel, but if the expected result is in A1 and the actual result is in B1, the formula in C1 is just:
If I understand your question correctly.
I guess if you really wanted to, you could make a UDF. alt+F11 opens the VB editor. Insert > Module and paste the code below in the window that opens.
Public Function PercentError (byVal Expect As Long, byVal Actual As Long) As Double
PercentError = Abs((Expect - Actual) / Expect)
The formula in C1 would then be =PercentError(A1,B1)