Count if unique combination

Danielv

New Member
Joined
Aug 16, 2015
Messages
1
Hi guys,
could really use some help creating a complicated Indices file.
i am attempting to count the number of setup events for a given machine.
my Indices are setup in one tab, and all the data in a second tab.
the data tab is built as follows:

ABCDE
MachineDateOrder NumberEvent.......

<tbody>
</tbody>

usual this would be simple counting the number of "Setup" events for any Given Machine, however i have duplicates due to improper data input or workers taking a break during a setup (event number 5) and the resuming a setup.

I need to be able to count the number of "2" events corresponding to two unique identifiers, "Order Number" and "Machine".
keep in mind these are large files with several thousand entry's....

for example: (Filtered for machine AM-21)
ABCD
AM-21

<tbody>
</tbody>
27/10/2014
A98771

<tbody>
</tbody>
2
AM-21

<tbody>
</tbody>
27/10/2014
A98771

<tbody>
</tbody>
1
AM-2127/10/2014
A98736

<tbody>
</tbody>
1
AM-2127/10/2014
A97202

<tbody>
</tbody>
2
AM-2127/10/2014
A97202

<tbody>
</tbody>
1
AM-2127/10/2014
A97202

<tbody>
</tbody>
2
AM-2127/10/2014
A97202

<tbody>
</tbody>
1
AM-2127/10/2014A0944492
AM-2127/10/2014A0944495
AM-2127/10/2014A0944492

<tbody>
</tbody>
(1-Work, 2-SU, 5-Break)

in this example only the highlighted rows should be counted (3).
Also counting the number of unique Order numbers is not a good indicate as some orders don't have setups.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
If I read your question well, with a pivot table.


Book1
ABCDEFGH
1AMdatejobcountcriteriacriteriayes
2AM-2127-10-2014A987711yes
3AM-2127-10-2014A987361yesRijlabelsTelling van count
4AM-2127-10-2014A972021yesA0944491
5AM-2127-10-2014A972022NOA972022
6AM-2127-10-2014A972021yesA987361
7AM-2127-10-2014A0944495yesA987711
8AM-2127-10-2014A0944492NOEindtotaal5
Blad8
Cell Formulas
RangeFormula
E2=IF(D2=2,"NO","yes")
E3=IF(D3=2,"NO","yes")
E4=IF(D4=2,"NO","yes")
E5=IF(D5=2,"NO","yes")
E6=IF(D6=2,"NO","yes")
E7=IF(D7=2,"NO","yes")
E8=IF(D8=2,"NO","yes")
 
Upvote 0

Forum statistics

Threads
1,215,206
Messages
6,123,639
Members
449,111
Latest member
ghennedy

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