View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Franz Verga Franz Verga is offline
external usenet poster
 
Posts: 459
Default SUMPRODUCT issues

Ashlynn Grace wrote:
I really wish that I could use the SUMIF .... but doesn't that
require that both workbooks be open? I want this to work whether or
not both are open. I was told that SUMPRODUCT works to do this over
SUMIF... I may be wrong. Can I just translate that SUMIF statement
over to the SUMPRODUCT, or do I need to change anything?

The operation you describe is doable with simple a SUMIF:
=SUMIF([WBA.xls]Sheet1!A:A,"John Doe",[WBA.xls]Sheet1!K:K)


Hi Ashlynn,

SUMIF function requires both WB open.
To translate from SUMIF to SUMPRODUCT you have to remember that in
SUMPRODUCT you cannot use whole columns, so the above formula could be
translated in this way:

=SUMPRODUCT(([WBA.xls]Sheet1!A2:A1000="John
Doe")*([WBA.xls]Sheet1!K2:K1000))

or if you want the possibility to change the condition, you can use:

=SUMPRODUCT(([WBA.xls]Sheet1!A2:A1000=A3)*([WBA.xls]Sheet1!K2:K1000))

where in A3 you can type "John Doe" (whitout quote) or use a Data Validation
to change the value.

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy