Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom and Chip, got me going. Thanks guys
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Commenting custom formula fields/formula on formula editor | Excel Programming |