Calculating percentage change when one or both factors are zero

jmlyon954

New Member
Joined
May 25, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am working on a budget template and having issues with the #DIV/0! error. I found the below formula in a thread from 2019 that works great when one factor is zero. Unfortunately, It's a 5-year capital plan comparison, and some years have zeros for the new and old values giving me the #DIV/0! error. Could anyone please help me use the below formula and add that if both factors are zero, it will result in a 0.00% change?

I would greatly appreciate any help. Thank you.

=IF(AND(OLD VALUE=0,New Value>0),1,IF(MIN(OLD VALUE,NEW VALUE)<=0,(NEW VALUE-OLD VALUE)/ABS(OLD VALUE),(NEW VALUE/OLD VALUE)-1))
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Welcome to the Board!

One simple way is to simply wrap your formula in an IFERROR formula (in which you tell Excel what to return in the event of an error), i.e.
=IFERROR(your formula,0)
 
Upvote 0
Solution
Welcome to the Board!

One simple way is to simply wrap your formula in an IFERROR formula (in which you tell Excel what to return in the event of an error), i.e.
=IFERROR(your formula,0)
You are the best! It worked. Thank you so much.
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,215,208
Messages
6,123,642
Members
449,111
Latest member
ghennedy

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