ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sum if based on PARTIAL content of another cell (https://www.excelbanter.com/excel-worksheet-functions/138053-sum-if-based-partial-content-another-cell.html)

[email protected]

sum if based on PARTIAL content of another cell
 
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 only sum, for example, values where the
vendor is XYZ. Here's an example:

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


JE McGimpsey

sum if based on PARTIAL content of another cell
 
One way:

=SUMIF(A:A,"*-XYZ-*",B:B)

In article .com,
wrote:

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 only sum, for example, values where the
vendor is XYZ. Here's an example:

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



All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com