Using IF formula

Blackspear

New Member
Joined
Apr 26, 2002
Messages
30
=IF(J3=0,"",J3/H3)

What if cell H3 and/or J3 is zero, what formula do I need to stop #Div/0! and #value ???
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
=IF(AND(J3<>0,H3<>0),J3/H3,"")

<pre>

If J3 does not = 0 and
H3 does not = 0 then J3/H3

Else ""

</pre>

Tom
 
Upvote 0
Many thanks Tom :) One more for you, a simple one I have 100 and the cell next to it I need 5% of 100

Cheers

Craig.
 
Upvote 0
On 2002-04-27 23:09, Aladin Akyurek wrote:
On 2002-04-27 22:45, Blackspear wrote:
=IF(J3=0,"",J3/H3)

What if cell H3 and/or J3 is zero, what formula do I need to stop #Div/0! and #value ???

=IF(H3,J3/H3,"")

By the way, you get a #VALUE! error only if H3 and/or J3 contains a text value like "abc".

The above formula will suffice when it's guaranteed that these cells will not have such text values while either one or both can be truly empty.
 
Upvote 0
Aladin, thank you so much, been a great help, easy to do on a calculator, not so easy in excel with formula's :)

Craig.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

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