complex sumif formula needed

ShanaVT

Board Regular
Joined
May 12, 2010
Messages
86
I have the below list of data and I need to sum everywhere column A lists "Wrong", however, I only want the formula to return 1 "Wrong" per name listed. Any help much appreciated.

[TABLE="width: 172"]
<TBODY>[TR]
[TD]OK</SPAN>[/TD]
[TD]Watts, Alan</SPAN>[/TD]
[/TR]
[TR]
[TD]Wrong</SPAN>[/TD]
[TD]Watts, Alan</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Watts, Alan</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Williams, Kelvin</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Williams, Kelvin</SPAN>[/TD]
[/TR]
[TR]
[TD]Wrong</SPAN>[/TD]
[TD]Williams, Kelvin</SPAN>[/TD]
[/TR]
[TR]
[TD]Wrong</SPAN>[/TD]
[TD]Williams, Kelvin</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Williams, Kelvin</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Williams, Kelvin</SPAN>[/TD]
[/TR]
[TR]
[TD]Wrong</SPAN>[/TD]
[TD]Young, Alvin</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Young, Alvin</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Young, Alvin</SPAN>[/TD]
[/TR]
[TR]
[TD]Wrong</SPAN>[/TD]
[TD]Young, Alvin</SPAN>[/TD]
[/TR]
[TR]
[TD]Wrong</SPAN>[/TD]
[TD]Young, Alvin</SPAN>[/TD]
[/TR]
[TR]
[TD]Wrong</SPAN>[/TD]
[TD]Young, Alvin</SPAN>[/TD]
[/TR]
[TR]
[TD]OK</SPAN>[/TD]
[TD]Young, Alvin</SPAN>[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL></COLGROUP>[/TABLE]
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
something like...

=SUM(IF(FREQUENCY(IF($A$2:$A$17="wrong",MATCH(B2:B17,B2:B17,0)),ROW(A2:A17)-ROW(A2)+1),1)) control shift enter

would return a count of 3

though I'm not sure that's exactly what you're looking for
 
Upvote 0
something like...

=SUM(IF(FREQUENCY(IF($A$2:$A$17="wrong",MATCH(B2:B17,B2:B17,0)),ROW(A2:A17)-ROW(A2)+1),1)) control shift enter

would return a count of 3

though I'm not sure that's exactly what you're looking for

Add a term for testing: B2:B17 <> "".
 
Upvote 0
Thanks Aladin,

I wasn't sure if it would be necessary to check B for "" to get the count

=SUM(IF(FREQUENCY(IF($A$2:$A$17="wrong",IF(B2:B17<>"",MATCH(B2:B17,B2:B17,0))),ROW(A2:A17)-ROW(A2)+1),1)) Control Shift Enter
 
Upvote 0
Thanks Aladin,

I wasn't sure if it would be necessary to check B for "" to get the count

=SUM(IF(FREQUENCY(IF($A$2:$A$17="wrong",IF(B2:B17<>"",MATCH(B2:B17,B2:B17,0))),ROW(A2:A17)-ROW(A2)+1),1)) Control Shift Enter

Always... We don't want a blank as a type (unless explicitly asked for).
 
Upvote 0

Forum statistics

Threads
1,222,143
Messages
6,164,178
Members
451,880
Latest member
2da

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