ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum columns only if certain value is present (https://www.excelbanter.com/excel-discussion-misc-queries/126814-sum-columns-only-if-certain-value-present.html)

Alex

Sum columns only if certain value is present
 
Hi everyone,

Is it possible to sum a list of values, but only count the value if a
particular field in the row equals something? So for example, I have
column B having a value and column C can have either Pending or
Cleared. I want to sum all values from say B2 through B100 where C2
through B100 equals Cleared. Is this possible?

Thanks ..

Alex


Dave F

Sum columns only if certain value is present
 
=SUMPRODUCT(--(B2:B100),--(C2:C100="Cleared"))

Dave
--
Brevity is the soul of wit.


"Alex" wrote:

Hi everyone,

Is it possible to sum a list of values, but only count the value if a
particular field in the row equals something? So for example, I have
column B having a value and column C can have either Pending or
Cleared. I want to sum all values from say B2 through B100 where C2
through B100 equals Cleared. Is this possible?

Thanks ..

Alex



daddylonglegs

Sum columns only if certain value is present
 
For a single condition, use SUMIF

=SUMIF(C2:C100,"Cleared",B2:B100)

"Dave F" wrote:

=SUMPRODUCT(--(B2:B100),--(C2:C100="Cleared"))

Dave
--
Brevity is the soul of wit.


"Alex" wrote:

Hi everyone,

Is it possible to sum a list of values, but only count the value if a
particular field in the row equals something? So for example, I have
column B having a value and column C can have either Pending or
Cleared. I want to sum all values from say B2 through B100 where C2
through B100 equals Cleared. Is this possible?

Thanks ..

Alex



cory

Sum columns only if certain value is present
 
=sumif(b2:b100,"Cleared",c2:c100)
--
CCO


"Alex" wrote:

Hi everyone,

Is it possible to sum a list of values, but only count the value if a
particular field in the row equals something? So for example, I have
column B having a value and column C can have either Pending or
Cleared. I want to sum all values from say B2 through B100 where C2
through B100 equals Cleared. Is this possible?

Thanks ..

Alex



pinmaster

Sum columns only if certain value is present
 
Hi,

Yes:

=SUMIF(C2:C100,"cleared",B2:B100)

HTH
Jean-Guy

"Alex" wrote:

Hi everyone,

Is it possible to sum a list of values, but only count the value if a
particular field in the row equals something? So for example, I have
column B having a value and column C can have either Pending or
Cleared. I want to sum all values from say B2 through B100 where C2
through B100 equals Cleared. Is this possible?

Thanks ..

Alex



Teethless mama

Sum columns only if certain value is present
 
=SUMIF(C2:C100,"Cleared",B2:B100)

"Alex" wrote:

Hi everyone,

Is it possible to sum a list of values, but only count the value if a
particular field in the row equals something? So for example, I have
column B having a value and column C can have either Pending or
Cleared. I want to sum all values from say B2 through B100 where C2
through B100 equals Cleared. Is this possible?

Thanks ..

Alex



VBANoob

Sum columns only if certain value is present
 
Hi,

Try

=SUMPRODUCT(--($C$2:$C$100="Cleared")*($B$2:$B$100))

VBA Noob

Alex wrote:
Hi everyone,

Is it possible to sum a list of values, but only count the value if a
particular field in the row equals something? So for example, I have
column B having a value and column C can have either Pending or
Cleared. I want to sum all values from say B2 through B100 where C2
through B100 equals Cleared. Is this possible?

Thanks ..

Alex




All times are GMT +1. The time now is 03:19 AM.

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