cellmatrix.net

Percent Change Error Trap

To keep the percent change formula from returning errors and/or extreme values, consider a nested IF statement to trap errors or values that fall outside of a certain range. In the example below, "n/a" refers to "not applicable". Errors have been trapped in lines one through three. In line four, the formula returns "n/a" because the absolute value of the change is greater than 200%. This logic is written into the formula to prevent it from returning exteme values.

image

The formula in G4 is below. It is copied from cell G4 into cells G6, G8, G10, and G12.

=IF(ISERROR((E12-F12)/ABS(F12)),"n/a",IF(ABS((E12-F12)/ABS(F12))>2,"n/a",IF((E12-F12)/ABS(F12)=-1,"n/a",(E12-F12)/ABS(F12))))

The second IF looks incomplete… it has greater than, without an argument.

If the error you get in the first if is a div by zero, you can simplify by using =IF(F4=0,"n/a", etc.

Posted by Jon Peltier  on  04/15  at  02:42 PM

Jon,

Thanks for catching that error . . I’ve made the correction.

John

Posted by  on  04/16  at  08:04 PM

Comment Form
Name: (Required)
E-Mail Address: (Optional)
Location: (Optional)
Web Site Address: (Optional)

pMcode is allowed for comment formatting // pMcode Quick Reference

Remember my personal information?
Notify me of follow-up comments?

Before submitting your comment, please enter the phrase you see below:


About

Formulas, Charts, and Models Created with Microsoft Excel.

Read more...

Statistics

  • Total Entries - 83
  • Current Viewers - 3
  • Days Online - 467

Categories

Entries by Day

July 2008
S M T W T F S
29 30 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2

Excel Web Logs

Syndicate

Validate

My Resources...

Copyright © 2007 - 2008