make criteria in sumif refer to another cell

G

Guest

I have a sumif function to return a report from a worksheet and would like to
make the condition refer to another cell (in the same workbook).

E.g.

This works...

A2: =SUMIF('Shipped Product'!A5:A100,"CustomerXYZ",'Shipped
Product'!E5:E100)

But this doesn't...

A1: CustomerXYZ
A2: =SUMIF('Shipped Product'!A5:A100,"=A1",'Shipped Product'!E5:E100)

How do I make the condition be that the range has to match what is in cell A1?

Thanks for your help.
 
G

Guest

Hi Keith,

With "=A1", it's looking for a cell that literally has "=A1" in the cell
value. You should try "="&A1 in place of "=A1". Hope this helps.

-Simon
 
G

Guest

Thanks, it now works as I need!

SiC said:
Hi Keith,

With "=A1", it's looking for a cell that literally has "=A1" in the cell
value. You should try "="&A1 in place of "=A1". Hope this helps.

-Simon
 
G

Guest

Thanks, this works too (the sumif help file made it look like quotes were
mandatory - I guess I misunderstood)
 

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