ExcelBanter

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

Ray

Conditional sum
 
I would like to sum a column depending the condition of another column as
below:-

A B
---------
3 O
4 O
2
1 O
5
2 O
----------
Sum up the cells of column A if O exists on the same row of the column B.

Thanks,

Ray



Richard Buttrey

On Mon, 5 Sep 2005 22:29:58 +0800, "Ray"
wrote:

I would like to sum a column depending the condition of another column as
below:-

A B
---------
3 O
4 O
2
1 O
5
2 O
----------
Sum up the cells of column A if O exists on the same row of the column B.

Thanks,

Ray


=sumif(B:B,"O",A:A)

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________

bj

sumif() should work for you

=sumif(B1:B10,"O",A1:A10)

"Ray" wrote:

I would like to sum a column depending the condition of another column as
below:-

A B
---------
3 O
4 O
2
1 O
5
2 O
----------
Sum up the cells of column A if O exists on the same row of the column B.

Thanks,

Ray




Ray

It works well.

Many thanks!

Ray

"bj" wrote in message
...
sumif() should work for you

=sumif(B1:B10,"O",A1:A10)

"Ray" wrote:

I would like to sum a column depending the condition of another column as
below:-

A B
---------
3 O
4 O
2
1 O
5
2 O
----------
Sum up the cells of column A if O exists on the same row of the column B.

Thanks,

Ray







All times are GMT +1. The time now is 02:31 PM.

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