Sumproduct /And

R

Rick

I hope this is answered elsewhere I couldn't find anything relevant.

I want to sum a column where 2 conditions are met. I have tried the
following formula but can't seem to get it to work.

=Sumproduct(--And(Sheet2!$A$1:$A$300=A2,Sheet2!$B$1:$B$300="Accrual")*Sheet2!$C$1:$C$300)

I am sure I have used a similar formula before but can't remember where.

Thanks
Rick
 
T

T. Valko

=SUMPRODUCT(--(Sheet2!$A$1:$A$300=A2),--(Sheet2!$B$1:$B$300="Accrual"),--(Sheet2!$C$1:$C$300))

No need for the double unary -- on the last array:

=SUMPRODUCT(--(Sheet2!$A$1:$A$300=A2),--(Sheet2!$B$1:$B$300="Accrual"),Sheet2!$C$1:$C$300)
 
S

Shane Devenshire

Hi,

In 2007 you can also use:

SUMIFS(Sheet2!C$1:C$300,Sheet2!A$1:A$300,A2,Sheet2!B$1:B$300,"Accrual"
 

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

Top