ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need a formula that sums a column but could exclude some cells (https://www.excelbanter.com/excel-worksheet-functions/38516-need-formula-sums-column-but-could-exclude-some-cells.html)

Watercolor artist

Need a formula that sums a column but could exclude some cells
 
In column F, from F5..F30, I have a set of dollar amounts that I want to sum.
However, if the value in cell K1="no" then I do not want to include in the
sum any value in column F that has in the same row the value "House" in
column I.

Howard

bj

try
=if(K1="no",sumproduct(--(I5:I30<"House"),F5:F30),Sum(F5:F30))

"Watercolor artist" wrote:

In column F, from F5..F30, I have a set of dollar amounts that I want to sum.
However, if the value in cell K1="no" then I do not want to include in the
sum any value in column F that has in the same row the value "House" in
column I.

Howard


Watercolor artist

Thanks.

"Watercolor artist" wrote:

In column F, from F5..F30, I have a set of dollar amounts that I want to sum.
However, if the value in cell K1="no" then I do not want to include in the
sum any value in column F that has in the same row the value "House" in
column I.

Howard


Watercolor artist

In "sumproduct(--(" what's the purpose of (--?

Howard

"bj" wrote:

try
=if(K1="no",sumproduct(--(I5:I30<"House"),F5:F30),Sum(F5:F30))

"Watercolor artist" wrote:

In column F, from F5..F30, I have a set of dollar amounts that I want to sum.
However, if the value in cell K1="no" then I do not want to include in the
sum any value in column F that has in the same row the value "House" in
column I.

Howard


Roger Govier

Take a look at the following explanation of SUMPRODUCT by Bob Phillips
http://xldynamic.com/source/xld.SUMPRODUCT.html

--
Regards

Roger Govier


"Watercolor artist" wrote in
message ...
In "sumproduct(--(" what's the purpose of (--?

Howard

"bj" wrote:

try
=if(K1="no",sumproduct(--(I5:I30<"House"),F5:F30),Sum(F5:F30))

"Watercolor artist" wrote:

In column F, from F5..F30, I have a set of dollar amounts that I want
to sum.
However, if the value in cell K1="no" then I do not want to include in
the
sum any value in column F that has in the same row the value "House" in
column I.

Howard





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

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