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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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,224,605
Messages
6,179,860
Members
452,948
Latest member
UsmanAli786

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