using sumproduct with a substring condition?

B

Ben

I have a calculation I just made that looks like this:
=SUMPRODUCT(--(C5:C50="persons name"),I5:I50)
which works out the hours billed from column I and works fine.

Column E has a description in it which sometimes has at the end of the
description the words "do not bill." Is there any way to add this
condition to the sumproduct - i.e. exclude from the sumproduct any value
in column I that has the "do not bill" sub-text in column e?

Thanks,
Ben
 
T

T. Valko

exclude from the sumproduct any value
in column I that has the "do not bill"

Try it like this, all on one line...

=SUMPRODUCT(--(C5:C50="persons name"),
--(ISERROR(SEARCH("do not bill",E5:E50))),I5:I50)
 

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