Count Unique actions based on selection criteria

delboy2405

New Member
Joined
Nov 14, 2007
Messages
46
Hi,

I've Had a good search on this forum around this, I can see some things like it but not exactly what I'm after and I'm stuck

I have a table below and I'm trying to count how many Unique values based on number of days

I'm looking to COUNT UNIQUE Ref that have CHANGE DAYS between between 30 and 90 days and Change status is CLOSED

Example answer would be

ABC_064 is Closed and has taken 77 days to Close so I would get 1.

I'm using SUMIFS to count the action days as it doesnt need to be unique the example code is

Code:
=SUMIFS(Table1[[count]:[count]], Table1[[Actions Days]:[Actions Days]], ">29",Table1[[Actions Days]:[Actions Days]], "<90", Table1[[Action Status]:[Action Status]], "Closed")

I suspect I need to use SUMPRODUCT but can't get my head round it.

Hopefully all makes sense. Any help appreciated.

RefChange RefDateOwnerAction closed DateAction StatusChange StatusChange Closed DateAction DaysChange DaysCounts
ABC_0641234514/08/2018Mr White30/10/2018ClosedClosed30/10/201877771
ABC_0641234514/08/2018Mr White01/11/2018ClosedClosed30/11/201879771
ABC_065678914/08/2018Mr Black01/11/2018ClosedOpen791281
ABC_065678914/08/2018Mr BlackOpenOpen1281281
ABC_065678914/08/2018Mr BlackOpenOpen1281281
ABC_0671811914/08/2018Mr Pink01/11/2018ClosedOpen39881
ABC_0671811914/08/2018Mr Pink01/11/2018ClosedOpen39881
ABC_0671811914/08/2018Mr PinkClosedOpen88881

<tbody>
</tbody>
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try

=SUMPRODUCT((A$2:A$9<>"")/COUNTIF(A$2:A$9,A$2:A$9&"")*(G2:G9="Closed")*(J2:J9>=30)*(J2:J9<=90))

This part isolates unique references

(A$2:A$9<>"")/COUNTIF(A$2:A$9,A$2:A$9&"")

Dont ask me how it works, I found it on the net ages ago
 
Last edited:
Upvote 0
Try:

=SUM(SIGN(FREQUENCY(IF(Table1[Action Days]>29,IF(Table1[Action Days]<90,IF(Table1[Action Status]="Closed",MATCH(Table1[Ref],Table1[Ref],0)))),ROW(Table1[Ref])-ROW(INDEX(Table1[Ref],1))+1)))

and confirm the formula by pressing Control+Shift+Enter, not just Enter.
 
Upvote 0
Hi Both,

Both work great, I prefer the SUMPRODUCT method, as I can personally make it work better to add more criteria if required
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,068
Members
449,091
Latest member
remmuS24

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