View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] mmartinucla@gmail.com is offline
external usenet poster
 
Posts: 4
Default sum based on PARTIAL content of another cell

On Apr 5, 6:30 pm, "Peo Sjoblom" wrote:
Use wildcards

=SUMIF(A1:A5,"*-TMN-*",B1:B5)

--
Regards,

Peo Sjoblom

wrote in message

ups.com...

I have a worksheet where the first column contains a special code
specific to each product we sell, containing a code for 1) the
territory where it's sold; 2) the vendor; 3) the product name; etc. I
am trying to figure out a way to create a sumif formula (or other
formula if necessary) to onlysum, for example, values where the
vendor is XYZ. Here's an example:


A B


1 C-SRS-TMN-ARBYS-5 50
2 C-SRS-SLF-TESTY-1 75
3 C-SRS-INC-CRASHY-3 100
4 C-SRS-TMN-TESTY-3 50
5 C-SRS-TMN-TESTY-4 80


So, let's say I want tosumeverything that has a Vendor of "TMN" (the
third set within the code). The result should be 180 (B1+B4+B5). Or,
if I want tosumeverything has a title of "Testy" (the fourth set
within the code). The result of that should be 205 (B2+B4+B5). Or,
even more complex, anything sold by TMN with the Title of "Testy" (130
= B4+B5).


I designed this whole coding system thinking I could do a combination
of SUMIF and the FIND/LEFT/MID functions, but realized after
implementing it that that just wouldn't work. Any help would be
GREATLY appreciated!


Thanks!


So much less complicated than I'd made it in my head! Thanks!!