View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Left as a condition in SUMPRODUCT

LEFT() returns a string, which you're comparing to a number. Try:

=SUMPRODUCT(--(Summary!M7:M65536=1),--(LEFT(Summary!K7:K65536,1)="1"),
Summary!J7:J65536)


In article .com,
Kigol wrote:

This function works fine until I insert the LEFT condition. Any ideas
on how to make it work? I tried entering it as an array as well and
nothing.

Works:
=SUMPRODUCT((Summary!M7:M65536=1)*(Summary!K7:K655 36=1),(Summary!
J7:J65536))

Doesn't work:
=SUMPRODUCT((Summary!M7:M65536=1)*(LEFT(Summary!K7 :K65536,1)=1),
(Summary!J7:J65536))