how do I get rid of my /div0 error

danleaf

New Member
Joined
Jun 4, 2015
Messages
4
I have a 2014 figure and a 2015 figure and i want to calculate the increase or decrease as a figure and as a %.
when each year has a figure that is not 0 then its ok and it works
but as soon as one of the years has a zero in then the /DIV0#! monster comes out.

One key point is that either one of the years figures could be a negative number.

PLEASE HELP..


the formula i have is;
Difference in value: =sum(2015-2014) ok it works (lets say this formula is in a cell called AM08)

Difference as a percentage: =IF(AM8>0,(SUM(2015-2014)/2014),(IF(AM8<0,(SUM(2015-2014)/2014),0)))

but i still get \div0 error.. is one of the numbers is a zero

what can i do??

i want if there is no number in 2014 or 2015 ;
if the difference is a negative, it shows -100%
if the difference is a positive, it shows 100%

PLEASE can you help me.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
1). =SUM(2015-2014)
Is that actually what you have or are you referring to cells that represent the year 2014 and 2015?
Or are these named ranges?
If that's what you actually have that should simply be

=2015-2014

2. =IF(AM8>0,(SUM(2015-2014)/2014),(IF(AM8<0,(SUM(2015-2014)/2014),0)))

So whether AM8 is > 0 or < 0 the result is the same

SUM(2015-2014)/2014

This too can be replaced.
=IF(AM8=0,0,SUM(2015-2014)/2014)
or
=IF(AM8=0,0,IFERROR(SUM(2015-2014)/2014,0))
 
Upvote 0
1). =SUM(2015-2014)
Is that actually what you have or are you referring to cells that represent the year 2014 and 2015?
Or are these named ranges?
If that's what you actually have that should simply be

=2015-2014

2. =IF(AM8>0,(SUM(2015-2014)/2014),(IF(AM8<0,(SUM(2015-2014)/2014),0)))

So whether AM8 is > 0 or < 0 the result is the same

SUM(2015-2014)/2014

This too can be replaced.
=IF(AM8=0,0,SUM(2015-2014)/2014)
or
=IF(AM8=0,0,IFERROR(SUM(2015-2014)/2014,0))



I tried but i cannot get the result.. I think maybe i have not explained it.
here is a link to dropbox, that shows an example file.

https://www.dropbox.com/s/c63erejw1uqixc0/temp.xlsx?dl=0

if you could have a look and tell me how to do it.

thanks very much
 
Upvote 0
Looks like you need

=IFERROR((F1-D1)/D1,1)

and format as percentage
 
Upvote 0
Thanks very much Deletedalien, but i see that that formula do not work for all my scenarios.

I have updated my file on dropbox to show the result of this formula... https://www.dropbox.com/s/c63erejw1uqixc0/temp.xlsx?dl=0

It does not work for when the difference is a negative, it should show -100%
and when the difference is zero, it should show +100%

so its not quite working.

thanks guys for all your help I just cannot get the formula.
 
Upvote 0
Hey guys

I think i cracked it but its a long long formula

can you take a look and comment on this please.

=IF(IF(prevcol>0,IFERROR((2015-2014)/2014,1),(IF(prevcol<0,IFERROR((2015-2014)/2014,-1)))),IF(prevcol>0,IFERROR((2015-2014)/2014,1),(IF(prevcol<0,IFERROR((2015-2014)/2014,-1)))),0)

prevcol = the cell that has the difference as a number.

here is my revised sheet.

Thanks for all the help guys

https://www.dropbox.com/s/c63erejw1uqixc0/temp.xlsx?dl=0

Danleaf !!
 
Upvote 0

Forum statistics

Threads
1,215,457
Messages
6,124,941
Members
449,197
Latest member
k_bs

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