Share via

Sumproduct with changing columns

Anonymous
2014-10-05T09:45:51+00:00

Hi,

I have a Sumproduct functions where I multiply 2 columns.

the problem is that the columns may change.

I can find the 2 columns to multiply very easy (MATCH function). But how do I incorporate this information in the SUMPRODUCT function?

I would like something like:

=SUMPRODUCT(Column(4),Column(8))

where 4 and 8 are parameters.

Thanks,

Yuval

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2014-10-06T08:17:06+00:00

Hi, I found a solution that works. I used the Address function with Indirect function.

=SUMPRODUCT(INDIRECT(B496),INDIRECT(B497))

where in B496 I have:

=ADDRESS(5,Summaries!B494,,,"Macro Status")&":"&ADDRESS(74,Summaries!B494)

(I am referring to rows 5 to 74)

and in B497 I have:

=ADDRESS(5,Summaries!B495,,,"Macro Status")&":"&ADDRESS(74,Summaries!B495)

B494 and B495 hold the column numbers that I want to use.

regards,

Yuval

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-10-05T09:55:08+00:00

    Hi,

    Maybe this.

    In G1 e.g. A1:A3, in H1 B1:B3

    =SUMPRODUCT=SUMPRODUCT(INDIRECT(G1),INDIRECT(H1))

    By changing G1 & H1, you can multiply other ranges.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-10-05T09:55:07+00:00

    hi Yuval.  if your SUMPRODUCT formula looks like this:

    =SUMPRODUCT(C1:C10,0,E1:E10)

    and the heading you want to match is "a" & "c" text, then

    =SUMPRODUCT(INDEX(A1:F10,0,MATCH("a",1:1,0)),INDEX(A1:F10,0,MATCH("c",1:1,0)))

    Was this answer helpful?

    0 comments No comments