Quite a simple one I think

grrrrr

Board Regular
Joined
Apr 20, 2011
Messages
60
I need to show a ratio in one cell that links into another.

The ratio is used sales to new but in my simple formula is coming out as #VALUE! if there aren't sales of one type due to dividing by zero.

How do I get around this?

Thanks! :biggrin:
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I'm not too sure that will work.

I'll give more detail. There are 2 boxes for used sale totals and 2 boxes for new sales and they need 1.5:1 used sales to new.

So, the formula used:new needs to be say, ((B1+B2)/(A1+A2))

It's just silly maths getting in the way. If there are 2 used sales but no new sales they have clearly met the target but it is trying to divide by zero and is messing up.
 
Upvote 0
I think that is the best it is going to get.

Thank you very much for your help :)

My only concern is the ratio won't pull through when they have no new sales even though the target has been met...
 
Upvote 0
There needs to be a figure in there to meet my 'over 1.5:1' requirement in another formula.

As it's dividing by 0 is it a cell format jobby?

This is hurting my head. You can't divide by zero, so a formula can't be in place - surely that's right? I will just have to do it manually in those cases I think?
 
Upvote 0
Yes and No.

I guess you could say something along the lines of

IF A1+A2=0 and B1+B2 = more than 1.5, then 1.5.

That worked in with the original formula?
 
Upvote 0
Maybe

=IF(AND(A1+A2=0,B1+B2>=1.5),1.5,IF(AND(A1+A2=0,B1+B2<1.5),1,(B1+B2)/(A1+A2)))
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,421
Members
452,913
Latest member
JWD210

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