Formula to calculate % coming up as #DIV/0! - what am I doing wrong?

halesowenmum

Active Member
Joined
Oct 20, 2010
Messages
383
Office Version
  1. 365
Platform
  1. Windows
Hi, I have the following spreadsheet:

In cell Q6 the value 237 (a total)
In cell P6 the value 99 (those out of the 237 that have been completed)
In R6 the result of the following formula on those two cells:

=(Q6-P6)/P6

The cell is formatted as %.

But I get #DIV/0! as the result - what have I done wrong?

I want to find out how much of 237 99 is, as a % - I always seem to find %s a real pain if you don't get 'em just right so any help would be so gratefully received.

Thanks very much indeedy.
 
halesowenmum,

If I understand you correctly:


Excel 2007
PQR
699237139%
Sheet1
Cell Formulas
RangeFormula
P6=99
Q6=237
R6=(Q6-P6)/P6


Or, maybe:


Excel 2007
PQR
699237139%
Sheet1
Cell Formulas
RangeFormula
R6=(Q6-P6)/P6
 
Upvote 0
Now I will freely admit that I am a total dunce when it comes to maths! Without Excel I'd never do anything mathematical!

So, surely 99 isn't 139% of 237 - it can't be a +100% value if it's less than the total can it? Do you see what I mean? (Or maybe this horrific cold and cough I've got and the copious quantities of liquid cough mixture I'm drinking have rotted my brain, finally).
 
Upvote 0
Hi

Your formula in R6 should read =P6/Q6 and then formatted as percentage. This gives 41.77% (rounded to two d.p.)

Try that.
 
Last edited:
Upvote 0
Hi,

You will get #DIV/0! error in that formula only if P6 is 0.

Maybe you should check that.

And later use the formula provided by Robert and Olddogandgrump.

Jai
 
Upvote 0
So this is why I got the #DIV message in the first place as in several cases I have no values or zero values which gives that result.

So if I want to find out the % of the total (not how much the total is more than the lower figure) but if there's a zero value to not get the #DIV message?? What exactly do I need to enter?????
 
Upvote 0
Hi, My formula of =P6/Q6 will tell you what percentage P6 is of Q6. You will always get a #DIV/0 error in the target cell of there is no value in Q6 as dividing by 0 is a mathematical no no. The only way to avaid it occuring is to only have the formula in rows that contain data in column Q. Conditional formatting to hide the #DIV/0 may work.
 
Upvote 0

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