#DIV/0!

matty_lou82

New Member
Joined
Sep 14, 2018
Messages
38
Hi - Is there a way I can actually divide by a zero and return the actual correct number rather than #DIV/0!.

I.e. - 250/0 = 250

Hopefully an easy one for a Friday (ps I have checked similar posts too but cant my answer)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
the correct answer is "undefined"
 
Upvote 0
Your question is absolutely bizarre.

Dissecting it,
"Is there a way I can actually divide by a zero"
No.

"and return the actual correct number rather than #DIV/0!"
There is no "actual correct number" because a number cannot be divided by zero; the result is "undefined" in mathematical terms.

What you claim to want is the formula's result to be (using your example) the numerator of 250 which means you purposely want an incorrect result to be what you claim is "the actual correct number". You can contrive some conditional text return for that formula but it violates a basic rule of mathematics.
 
Upvote 0
Your question is absolutely bizarre.

Dissecting it,
"Is there a way I can actually divide by a zero"
No.

"and return the actual correct number rather than #DIV/0!"
There is no "actual correct number" because a number cannot be divided by zero; the result is "undefined" in mathematical terms.

What you claim to want is the formula's result to be (using your example) the numerator of 250 which means you purposely want an incorrect result to be what you claim is "the actual correct number". You can contrive some conditional text return for that formula but it violates a basic rule of mathematics.
I see, on reflection I haven't thought this through. Thanks for the feedback, totally makes sense
 
Upvote 0
COuldnt you just use an Iferror formula.

ie: =iferror(x/y,x)

Yes it defies maths, but gives you what you want.
 
Upvote 0
Solution
Your question is absolutely bizarre.

Dissecting it,
"Is there a way I can actually divide by a zero"
No.

"and return the actual correct number rather than #DIV/0!"
There is no "actual correct number" because a number cannot be divided by zero; the result is "undefined" in mathematical terms.

What you claim to want is the formula's result to be (using your example) the numerator of 250 which means you purposely want an incorrect result to be what you claim is "the actual correct number". You can contrive some conditional text return for that formula but it violates a basic rule of mathematics.
For context purposes, the scenario as to why I asked this is involves me looking at hit rate versus contacts made. Anything with a contact rate of over 100 with zero hit rate, I want to highlight (therefore 100/0 = 100.... and hence will be highlighted).

A little convoluted and strange logic, and I understand your point, but for the purposes of this exercise it was required.

Thank you for getting back to me, much appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

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