ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Sum of cells (https://www.excelbanter.com/excel-worksheet-functions/140101-conditional-sum-cells.html)

EG

Conditional Sum of cells
 
I want to add cell C12 and C15 and B19 only if either C12 and C15 have a
number in them. Otherwise i want the cell left blank. How can i do this?

Thanks!

Eric

T. Valko

Conditional Sum of cells
 
Do you mean:

If C12 *and* C15
If C12 *or* C15

Here's something for both:

*and*

=IF(COUNT(C12,C15)=2,SUM(C12,C15,C19),"")

*or*

=IF(COUNT(C12,C15)=1,SUM(C12,C15,C19),"")

Biff

"EG" wrote in message
...
I want to add cell C12 and C15 and B19 only if either C12 and C15 have a
number in them. Otherwise i want the cell left blank. How can i do this?

Thanks!

Eric




David Biddulph[_2_]

Conditional Sum of cells
 
=IF(OR(ISNUMBER(C12),ISNUMBER(C15)),C12+C15+B19,"" )
--
David Biddulph

"EG" wrote in message
...
I want to add cell C12 and C15 and B19 only if either C12 and C15 have a
number in them. Otherwise i want the cell left blank. How can i do this?

Thanks!

Eric




T. Valko

Conditional Sum of cells
 
Let's change that *or* formula to:

=IF(COUNT(C12,C15)0,SUM(C12,C15,C19),"")

Biff

"T. Valko" wrote in message
...
Do you mean:

If C12 *and* C15
If C12 *or* C15

Here's something for both:

*and*

=IF(COUNT(C12,C15)=2,SUM(C12,C15,C19),"")

*or*

=IF(COUNT(C12,C15)=1,SUM(C12,C15,C19),"")

Biff

"EG" wrote in message
...
I want to add cell C12 and C15 and B19 only if either C12 and C15 have a
number in them. Otherwise i want the cell left blank. How can i do
this?

Thanks!

Eric







All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com