Adding cells but leaving blank if not populated


S

Scoober

I am trying to add cells C5 thru I5 to populate J5, I would like J5 to remain
blank if no figures are entered into cell C5 thru I5 instead of having a zero

I have tried the following:

=IF(OR(C5="",D5="",E5="",F5="",G5="",H5="",I5=""),"",(C5+D5+E5+F5+G5+H5+I5))

But this formula only leaves a blank J5 and will not add (say) C5 and F5 if
the other cells in the formula are empty.

Where am I going wrong?
 
Ad

Advertisements

J

Jacob Skaria

Replace OR with AND
=IF(AND(C5="",D5="",E5="",F5="",G5="",H5="",I5=""),"",(C5+D5+E5+F5+G5+H5+I5))

'Using SUM()
=IF(SUM(C5:I5),SUM(C5:I5),"")

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top