• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SumIf Contains Question

I have some data that has items like Red Pen, Paper, Blue Pen etc. I want to do a SumIf based on contains a word like pen and i have this formula that works ok. =SUMIF(D4:D11,"*Pen*",E4:E11)

My issue I don't want to have a hard coded word in there like Pen. I want to have a drop down in Cell A1 that has items in it already (Say Pen, Marker, etc). This way someone selects the drop down and the totals update. This formula doens't work with the "" and cell A1. How can this be modified to work?

=SUMIF(D4:D11,"*A1*",E4:E11)

Thanks,
Robert
 
I have some data that has items like Red Pen, Paper, Blue Pen etc. I want to do a SumIf based on contains a word like pen and i have this formula that works ok. =SUMIF(D4:D11,"*Pen*",E4:E11)

My issue I don't want to have a hard coded word in there like Pen. I want to have a drop down in Cell A1 that has items in it already (Say Pen, Marker, etc). This way someone selects the drop down and the totals update. This formula doens't work with the "" and cell A1. How can this be modified to work?

=SUMIF(D4:D11,"*A1*",E4:E11)

Thanks,
Robert


Hi,

Try it like this

=SUMIF(D4:D11,"*" & A1 &"*",E4:E11)
 
Back
Top