#div/0!

Acoustic

New Member
Joined
Apr 13, 2011
Messages
24
hi all

i have here, hopefully a very simple one that i havent been able to find anywhere.
i have for example, 2 senarios A1=10 and B1=0
and A2=0 and B2=10

i am trying to return errors as a zero value.
what i have got so far is IF(A1=0,0,A1/B1)

this works if A1 is zero, but when B1 has a zero im a bit stuck for what to put as a formula

hope that is enough information cheers
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi Acoustic,

Maybe i'm missing something, but if A1 = 0 the formula A1/B1 returns 0, so you wouldnt need the condition IF(A1=0,0

Maybe you need something like
=IF(B1<>0, A1/B1, "some message/value")

HTH

M.
 
Upvote 0
awesome guys cheers, thanks, they both work great. I understand the first one, not fully grasping the secong reply though, although it looks so simple

cheers all the same
 
Upvote 0

Forum statistics

Threads
1,224,593
Messages
6,179,791
Members
452,942
Latest member
VijayNewtoExcel

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