SUM Formula ignoring 0 Help!!

stephen.smith

Board Regular
Joined
Jul 7, 2010
Messages
119
Hi Guys
I am trying to perform a formula to sum a number of cells e.g. =sum(B5:P5), however if there is no figures in these cells I would like the cell to remain blank. Can anyone help with this please.
Thanks
Stephen
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Thats great guys, also is there an average formula that ignores the 0 in making an average and also will display if there is no values in the cells to average that it will not display a value in the cell.
Thanks
 
Upvote 0
Code:
=AVERAGE(IF(B5:P5>0,B5:P5))

****you must hold down the cntrol + shift keys when you press enter.

This will put curly brackets {} around the formula, making it an array formula. (There's lots of stuff in the archive here about arrays if you want to learn more.)
 
Upvote 0
Set custom format:
#;#;;
and use formulas as usual
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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