IFERROR in nested ifs?

jencha

New Member
Joined
Nov 10, 2017
Messages
20
Hello All,

I'm using the following formula but want zeros when 0/0, instead getting div/0#

IF(G200<1,(G200-F200)/F200,IF(F200=0,"100%",(G200-F200)/(ABS(F200))))

How can I format this? This is for y/y growth just for context.

Jenny
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Just wrap the entire formula in Iferror..

Try
=IFERROR(IF(G200<1,(G200-F200)/F200,IF(F200=0,"100%",(G200-F200)/(ABS(F200)))),0)
 
Upvote 0
I am confused. You say you want 0 when 0/0, but the only way to get that is when F200 is 0.
But in your formula, you are saying that you want to return "100%" when F200 is zero.
So which is it? Do you want 0 or 100% when F200 is zero?

Whatever your choice, checking the value of F200 to see if it is zero is the first thing you want to check. If you do that, your error goes away.
 
Upvote 0
Yes, what this does is returns growth rates that are x/0-1 and 0/x-1 as 100% and -100% respectively. Still pondering as to whether this is the best way to think about it...
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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