ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Sum in Range (https://www.excelbanter.com/excel-worksheet-functions/129900-conditional-sum-range.html)

Exceller

Conditional Sum in Range
 
Dear Gurus,

I need a formula that sums subtotals in a range. Here's an example range:

A
1 <formula
2 <header
3 5
4 5
5 10
6
7 5
8 5
9 10
10

I need the formula in A1 to sum every cell in that range that is above a
blank cell (the "blank" cells have formulas in them, but return no values).
So the formula in cell A1 will return a value of 20, since it sums cells A5
and A9.

Thank you.



Bob Phillips

Conditional Sum in Range
 
=SUMIF(A2:A20,"",A3:A21)

Note the relationship between the ranges, offset by one row.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Exceller" wrote in message
...
Dear Gurus,

I need a formula that sums subtotals in a range. Here's an example range:

A
1 <formula
2 <header
3 5
4 5
5 10
6
7 5
8 5
9 10
10

I need the formula in A1 to sum every cell in that range that is above a
blank cell (the "blank" cells have formulas in them, but return no
values).
So the formula in cell A1 will return a value of 20, since it sums cells
A5
and A9.

Thank you.





Exceller

Conditional Sum in Range
 
It works!
Thanks, Bob, for your valuable help!
Regards,
Exceller

"Bob Phillips" wrote:

=SUMIF(A2:A20,"",A3:A21)

Note the relationship between the ranges, offset by one row.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Exceller" wrote in message
...
Dear Gurus,

I need a formula that sums subtotals in a range. Here's an example range:

A
1 <formula
2 <header
3 5
4 5
5 10
6
7 5
8 5
9 10
10

I need the formula in A1 to sum every cell in that range that is above a
blank cell (the "blank" cells have formulas in them, but return no
values).
So the formula in cell A1 will return a value of 20, since it sums cells
A5
and A9.

Thank you.







All times are GMT +1. The time now is 12:16 PM.

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