Changing conditional sum format to "Sum If"

  • Thread starter Thread starter Gina
  • Start date Start date
G

Gina

I am currently using

=SUM(IF(Data!$E$2:$E$1700=2467,Data!$Q$2:$Q$1700,0))

But I would instead like to reference cell B2 of the current worksheet
rather than typing 2467. The reason being, I'd like to be able to drag this
calculation down, and have the formula in the cell just below reference cell
B3 of the current worksheet, etc.

Are there any sumproduct experts available who could steer me in the right
direction?

Gina
 
I think you mean that you want to do this:

=SUMPRODUCT(--(Data!$E$2:$E$1700=$B$2),--(Data!$Q$2:$Q$1700))

No need for CSE when you enter it.

Hope this helps.

Pete
 
Pete_UK said:
I think you mean that you want to do this:

=SUMPRODUCT(--(Data!$E$2:$E$1700=$B$2),--(Data!$Q$2:$Q$1700))

No need for CSE when you enter it.

Hope this helps.

Pete

This is exactly what I meant. It returned the same value and worked great.
Thank you.

Gina
 
My reading of the OP's question was that she wanted the B2 to change to B3
when copied downwards, in which case I would have thought not
=SUMPRODUCT(--(Data!$E$2:$E$1700=$B$2),--(Data!$Q$2:$Q$1700))
but
=SUMPRODUCT(--(Data!$E$2:$E$1700=$B2),--(Data!$Q$2:$Q$1700))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top