If isblank or equals zero

Asw091

New Member
Hi guys,

I hope you can help,

Im trying to achieve something here that I just cant seem to get my head around.

I want it to work out what i8/i7 is, but only if both of them have a value. I have a working formula for that. =IF(OR(ISBLANK(I7),ISBLANK(I8)),,I8/I7)

However when theyre both showing 0, it returns #DIV/0! Because it cant divide two zeros.

How can I put if I7 or I8 is blank or if I7+I8=0, ignore the formula otherwise do I8/I7?

Ultimately, I would like a formula that says if either cell is blank show 0, if the sum of both are equal to or less than 0, show 0, if they total more than 0, show the number.

Is this possible or am I asking too much?

I hope this makes sense.

Any help would be greatly appreciated.

Thanks.

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Trebor76

Well-known Member
Hi Asw091,

Here's two possibilities, I'm sure there's more:

=IF(OR(ISNUMBER(I7)=FALSE,ISNUMBER(I8)=FALSE),0,I8/I7)
=IFERROR(I8/I7,0)

HTH

Robert

Rick Rothstein

MrExcel MVP
It is the bottom number that cannot be 0 (dividing by 0 is undefined)... the top number is immaterial. So you might consider doing it this way...

=IF(I7=0,"",I8/I7)

Last edited:

MARK858

MrExcel MVP
Ultimately, I would like a formula that says if either cell is blank show 0, if the sum of both are equal to or less than 0, show 0, if they total more than 0, show the number.
Another possibility maybe...

Asw091

New Member
It is the bottom number that cannot be 0 (dividing by 0 is undefined)... the top number is immaterial. So you might consider doing it this way...

=IF(I7=0,"",I8/I7)

? no way. Talk about over thinking it..

Thank you.

Replies
4
Views
62
Replies
1
Views
205
Replies
2
Views
86
Replies
24
Views
939
Replies
1
Views
171

1,129,763
Messages
5,638,215
Members
417,014
Latest member
dualwieldbacon

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.

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

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