ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   More formula help (https://www.excelbanter.com/excel-programming/344773-more-formula-help.html)

GregR

More formula help
 
I have this formula which is not giving the expected results

=SUMPRODUCT(LEFT(K5:K1002,1)="8",(A5:A1002)=TRUE,( Y5:Y1002))

The result I am getting is 0. What I am trying to achieve is to sum the
numbers in Y5:Y1002, if the corresponding cell in K5:K1002 begins with
an "8" (account # entered as text, example, 800-000-900) and the
corresponding cell in A5:A1002 is not blank. TIA

Greg


Chip Pearson

More formula help
 
You need to coerce the logical values returned by your comparison
into numeric values.

=SUMPRODUCT(--(LEFT(K5:K1002,1)="8"),--((A5:A1002)=TRUE),(Y5:Y1002))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"GregR" wrote in message
ups.com...
I have this formula which is not giving the expected results

=SUMPRODUCT(LEFT(K5:K1002,1)="8",(A5:A1002)=TRUE,( Y5:Y1002))

The result I am getting is 0. What I am trying to achieve is to
sum the
numbers in Y5:Y1002, if the corresponding cell in K5:K1002
begins with
an "8" (account # entered as text, example, 800-000-900) and
the
corresponding cell in A5:A1002 is not blank. TIA

Greg




Tom Ogilvy

More formula help
 
=SUMPRODUCT(--(LEFT(K5:K1002,1)="8"),--(A5:A1002<""),Y5:Y1002)

--
Regards,
Tom Ogilvy


"GregR" wrote in message
ups.com...
I have this formula which is not giving the expected results

=SUMPRODUCT(LEFT(K5:K1002,1)="8",(A5:A1002)=TRUE,( Y5:Y1002))

The result I am getting is 0. What I am trying to achieve is to sum the
numbers in Y5:Y1002, if the corresponding cell in K5:K1002 begins with
an "8" (account # entered as text, example, 800-000-900) and the
corresponding cell in A5:A1002 is not blank. TIA

Greg




GregR

More formula help
 
Tom and Chip, got me going. Thanks guys



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

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