Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default More formula help

Tom and Chip, got me going. Thanks guys

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"