I am trying to eliminate the annoying Div/0 error, however I dont know where to insert the ISERROR. Here is the formula I am using.
=IF(D:D>E:E,D:D/E:E,E:E/D:D*-1)
I am trying to eliminate the annoying Div/0 error, however I dont know where to insert the ISERROR. Here is the formula I am using.
=IF(D:D>E:E,D:D/E:E,E:E/D:D*-1)
Hi there,
maybe:
Formula:
Please Login or Register to view this content.
Regards
Miroslav R.
(If You like my solutions, feel free to add reputation.)
What result do you want if the denominator is zero? In this case, you do not have to use ISERROR, you can simply test for a zero denominator.
=IF(D:D>E:E,IF(E:E=0,"?",D:D/E:E),IF(D:D=0,"?",E:E/D:D*-1))
Replace the two "?" with whatever you want to show if the denominator is zero in each of the two cases.
By the way, it's a little unusual to use that syntax, although it works. Some, but not all, functions will return an array when you provide array arguments. Unfortunately this behavior is not well documented by Microsoft, so I tend to avoid it.
The more usual version would be
Formula:
Please Login or Register to view this content.
and copy down.
Thank you, your solution worked. I appreciate the help.
You are welcome!
send from my xperia z via tapatalk
=IF(D:D>E:E,D:D/E:E,E:E/D:D*-1) strange formula what's it supposed to do
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Thank you, this worked exactly how i wanted it to.
=IF(D:D>E:E,IF(E:E=0,"N/A",D:D/E:E),IF(D:D=0,"0%",E:E/D:D*-1))
Changed the "?" to what i needed them to display as you suggested.
I appreciate the help!!
I actually ended up changing it slightly. Which works essentially the same for what I need it to do.
=IF(D:D>E:E,IF(E:E=0,"N/A",D:D/E:E),IF(D:D=0,"0%",E:E/D:D*-1))
It's for a basic spreadsheet I needed to track donations vs receiving and show the ratio/percentage.
D= donations
E= received
If the person donates more than they receive then they will have a positive ratio.
If the person receives more than they donate then they will have a negative ratio.
I was having an issue for when someone donates but does not receive (div/0 error), and for when someone does not donate but does receive.
Now when someone donates but does not receive it shows "N/A"
But when someone does not donate but does receive it shows "0%"
If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."
If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon below their name.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks