Sum Values with different criteria without repeating

jacquelineBo

New Member
Joined
Dec 30, 2015
Messages
1
Hello,

I need to sum the amount that appears in the column C every time that on the column B appears "tech" or "error", however there are lines on the column B that appears Tech and Error in the same cell and I dont want to sum the amounts of column C twice. How can I do it, please?



[TABLE="width: 285"]
<tbody>[TR]
[TD="align: left"][TABLE="width: 349"]
<tbody>[TR]
[TD="align: left"]Tech[/TD]
[TD][/TD]
[TD="align: left"]Tech op[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: left"]Error[/TD]
[TD][/TD]
[TD="align: left"]Tech problems[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: left"]tech error[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: left"]hiden[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: left"]open[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: left"]error op[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: left"]tech error with computer[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: left"]error on the table[/TD]
[TD="align: right"]2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD="align: left"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Try this:

=(SUMIF(B$1:B$8,"*tech*",C$1:C$8)+SUMIF(B$1:B$8,"*error*",C$1:C$8))-SUMIFS(C$1:C$8,B$1:B$8,"*error*",B$1:B$8,"*tech*")
 
Upvote 0
[TABLE="class: grid"]
<tbody>[TR]
[TD]Row\Col[/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[TD]
C​
[/TD]
[TD]
D​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]Tech[/TD]
[TD][/TD]
[TD]Tech op[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]Error[/TD]
[TD][/TD]
[TD]Tech problems[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]tech error[/TD]
[TD]
6​
[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]
28​
[/TD]
[TD][/TD]
[TD]hiden[/TD]
[TD]
7​
[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]open[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
6​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]error op[/TD]
[TD]
9​
[/TD]
[/TR]
[TR]
[TD]
7​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]tech error with computer[/TD]
[TD]
4​
[/TD]
[/TR]
[TR]
[TD]
8​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]error on the table[/TD]
[TD]
2​
[/TD]
[/TR]
</tbody>[/TABLE]


In A4 control+shift+enter:

=SUM(IF(MMULT(ISNUMBER(SEARCH(TRANSPOSE(A1:A2),C1:C8))+0,ROW(A1:A2)^0),D1:D8))

If you want to avoid matching tech against technician...

Control+shift+enter:

=SUM(IF(MMULT(ISNUMBER(SEARCH(TRANSPOSE(" "&A1:A2&" ")," "&C1:C8&" "))+0,ROW(A1:A2)^0),D1:D8))
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top