How to avoid '*' being used as wildcard in SUMIF?

K

Kealkil4

A data field for which I wish to do a SUMIF begins with the character "*".
e.g I have a Product Code of "*SPEC" where the * is the first character of a
5 character code. When I do a SUMIF the answer includes any row where the
Range value ends with the characters "SPEC".

I do not want the "*" being used as a wildcard in this instance.

All Suggestions welcome.

Issue arises in both Excel 2003 and Excel 2007.
 
E

Eduardo

Hi,
The only way I can see is that you have a list of your porduct codes in
another column where you perform the sum, i.e. column H you have the list of
products starting H2, then your information is from column A to E where A is
your product code and E is the column to summarize, so in column I enter

=sumproduct(--(H2=$A$1:$A$10000),$E$1:$E$10000)

copy formula down, change ranges to match yours
 
T

T. Valko

Try it like this...

=SUMIF(A1:A10,"~*spec",B1:B10)

The tilde is an "escape character" that tells Excel to treat the astrisk as
the literal asterisk character and not a wildcard.
 

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