OPEN OFFICE: add cells then divide

malk415

New Member
Joined
Mar 30, 2017
Messages
8
All:

I am trying to make a formula to add the value in cell c20 through m20 and divide that sum by the value of another cell B20 and have the result in percent.

I wrote the formula like this: =SUM(C20:M20)/B20%
The formula seems to work and give the correct answer but the formula cell shows:

<tbody>
[TD="width: 86, bgcolor: #00FF66"]#DIV/0!
[/TD]

</tbody>
so something it not right in the formula.

Any help would be appreciated.

Mark
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Re: add cells then divide

if B3 is zero, you will get that error. You can use IFERROR function to avoid that error दो.

=IFERROR(SUM(C20:M20)/B20%,"B3 is zero")
 
Last edited:
Upvote 0
Re: add cells then divide

if B3 is zero, you will get that error. You can use IFERROR function to avoid that error दो.

=IFERROR(SUM(C20:M20)/B20%,"B3 is zero")

If I put a value in B3 if works fine without the # using the formula as I wrote it.

But if I put in your formula I get error 508

Mark
 
Upvote 0
Re: add cells then divide

Hi There,

Try replacing coma with semicolon

That might do the trick

Regards
 
Upvote 0
Re: add cells then divide

Hi There,

Try replacing coma with semicolon

That might do the trick

Regards

When I replace the coma with semicolon I get #NAME?

should "iferror" and is zero be in caps or small letters? Also should "is zero" have spaces?

thanks for your help

Mark
 
Upvote 0
Re: add cells then divide

Code:
=IF(B20<>0,[COLOR=#333333]SUM(C20:M20)/B20,"")[/COLOR]

Format cell as a percentage.
 
Last edited:
Upvote 0
Re: add cells then divide

Wouldn't it simply be =SUM(C20:M20)/B20 formatted as a percentage?

That works but only if there is a value entered in a c or m cell. If the sheet is blank before a value is entered I get "DIV/0!.

And if I click on any cell the formula is changed automatically.

Mark
 
Upvote 0
Re: add cells then divide

That works but only if there is a value entered in a c or m cell. If the sheet is blank before a value is entered I get "DIV/0!.
See my reply.
 
Upvote 0
Re: add cells then divide

That works but only if there is a value entered in a c or m cell. If the sheet is blank before a value is entered I get "DIV/0!.

And if I click on any cell the formula is changed automatically.

Mark

The only time that you will get a DIV/0 error is when B20 is zero or blank. You can include an IFERROR function to show the error as blank until you put data into B20.

=IFERROR(SUM(C20:M20)/B20,"")

I don't understand the second part of your response.
 
Upvote 0

Forum statistics

Threads
1,223,794
Messages
6,174,643
Members
452,575
Latest member
Fstick546

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