COUNTIFS alternative

kalmar27615

New Member
Joined
May 12, 2014
Messages
7
Hello everyone, I have the following issue I'm hoping you can help me with:

I am trying to count the number of occurrences with 2 criteria: =COUNTIFS(B:B,"Birmingham",C:C,"PASSED")

AL001Birmingham
AL001CV
AL001PHYPASSED
AL001No
AL001Vendor
AL002BirminghamPASSED
AL002PHY
AL002Vendor
AL003Birmingham
AL003DAPASSED

<tbody>
</tbody>

The location of the "PASSED" entry is dynamic and is not always directly across from "Birmingham" which is why I am not getting the correct results. Is there a solution to this? Thank you all in advance!
 
Please try to be specific with your requirements. It will make this move much more smoothly. Try this version:


Excel 2012
ABCDEF
1
2CivilAL001Birmingham4
3CivilAL001CV
4CivilAL001PHYPASSEDBirmingham
5CivilAL001No
6CivilAL001Vendor
7CivilAL002BirminghamPASSED
8CivilAL002PHY
9CivilAL002Vendor
10CivilAL003Birmingham
11CivilAL003DAPASSED
12ElecAL003Birmingham
13ElecAL003DA
14ElecAL003DAPASSED
Sheet1
Cell Formulas
RangeFormula
F2{=SUM(IF(FREQUENCY(IF(C2:C14=E4,ROW(C2:C14)),IF((A1:A15<>A2:A16)+(B1:B15<>B2:B16),ROW(B1:B15)))*FREQUENCY(IF(D2:D14="PASSED",ROW(C2:C14)),IF((A1:A15<>A2:A16)+(B1:B15<>B2:B16),ROW(B1:B15))),1))}
Press CTRL+SHIFT+ENTER to enter array formulas.


This version will separate the list into ranges, each range demarked by every time column A or B changes. It will then add 1 every time there is at least 1 Birmingham in that range in column C, and at least 1 PASSED in that range in column D.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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