View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default SUMPRODUCT with INDIRECT

The "--" is not part of the cell address. It's there to convert trues and
falses to numbers which Sumproduct can work with. Try this:
=SUMPRODUCT(--((INDIRECT("'["&$B$2&"_"&D6&".xlsm]weekly
timesheet'!N:N=C6")),(INDIRECT("'["&$B$2&"_"&D6&".xlsm]weekly
timesheet'!L:L")))

which you could simplify by removing the pair of parentheses around the
Indirects

Regards,
Fred

"Nancy Taylor" wrote in message
...
I am attempting to replace a SUMIF with a SUMPRODUCT so that I can calc on
workbooks that are not open. I am able to get the SUMPRODUCT to work
fine,
but when I try to add INDIRECT so that I can build the parms to pass to
the
SUMPRODUCT, I am getting #REF errors. Once I get this working, I'll try
to
get the indirect.ext working.

I can't seem to find my syntax error. Do you happen to see the problem?

SUMPRODUCT without the INDIRECT that is working:
=SUMPRODUCT(--('[09122009_Nancy Taylor.xlsm]Weekly
Timesheet'!N:N=C6),('[09122009_Nancy Taylor.xlsm]Weekly Timesheet'!L:L))

Trying to work in my INDIRECT statements. The second parm is fine - it's
the first one that Excel doesn't like:
=SUMPRODUCT((INDIRECT("--('["&$B$2&"_"&D6&".xlsm]weekly
timesheet'!N:N=C6")),(INDIRECT("'["&$B$2&"_"&D6&".xlsm]weekly
timesheet'!L:L")))