Dynamic List of Unique Items Based on Criteria

Maddy1234

New Member
Joined
Mar 9, 2018
Messages
24
Hello wise people,

I need some help on a specific query. I'm trying out a simple BI to help manage the employees queue work rates.

There are two types of queues; Production and non- Production. Production Codes will have volumes ranging from 0 to any number and the non production codes will have "-". Please see below.

[TABLE="width: 358"]
<tbody>[TR]
[TD]Queue[/TD]
[TD]Time Taken[/TD]
[TD="align: center"]Volumes[/TD]
[/TR]
[TR]
[TD]Production Queue 1[/TD]
[TD="align: center"]1:00[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD]Production Queue 2[/TD]
[TD="align: center"]0:30[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD]Meal Break[/TD]
[TD="align: center"]0:45[/TD]
[TD="align: center"]-[/TD]
[/TR]
[TR]
[TD]Production Queue 2[/TD]
[TD="align: center"]1:30[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]Staff Meeting[/TD]
[TD="align: center"]0:20[/TD]
[TD="align: center"]-[/TD]
[/TR]
[TR]
[TD]Production Queue 1[/TD]
[TD="align: center"]1:00[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]Production Queue 2[/TD]
[TD="align: center"]0:45[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD]System Down[/TD]
[TD="align: center"]0:10[/TD]
[TD="align: center"]-[/TD]
[/TR]
</tbody>[/TABLE]

I want to dynamically create two simple separate lists for Production and non production. Please see below for desired result.

[TABLE="width: 360"]
<tbody>[TR]
[TD]Production[/TD]
[TD][/TD]
[TD]Non Production[/TD]
[/TR]
[TR]
[TD]Production Queue 1[/TD]
[TD][/TD]
[TD]Meal Break[/TD]
[/TR]
[TR]
[TD]Production Queue 2[/TD]
[TD][/TD]
[TD]Staff Meeting[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]System Down[/TD]
[/TR]
</tbody>[/TABLE]

I do not want to use pivot tables and I would appreciate if someone could help me achieve the desire result without the use of Ctrl+Shift+Enter.

Many thanks in advance.
 
Last edited:

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hey. Pivot tables are not required but I can't think of a way to do this without an array formula like this:


Book1
ABCDEF
1QueueTime TakenVolumesProductionNon Production
2Production Queue 101:001Production Queue 1Meal Break
3Production Queue 200:300Production Queue 2Staff Meeting
4Meal Break00:45-System Down
5Production Queue 201:302
6Staff Meeting00:20-
7Production Queue 101:002
8Production Queue 200:451
9System Down00:10-
Sheet1
Cell Formulas
RangeFormula
E2{=IFERROR(INDEX($A$2:$A$9,MATCH(0,IF($C$2:$C$9<>"-",COUNTIF($E$1:$E1,$A$2:$A$9),""),0)),"")}
F2{=IFERROR(INDEX($A$2:$A$9,MATCH(0,IF($C$2:$C$9="-",COUNTIF($F$1:$F1,$A$2:$A$9),""),0)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0
Hi, here is an option that does not require CSE - note though that these are still array processing formula with the associated negative impact of using large ranges and on top of that will probably be less efficient than the CSE entered alternatives .


Excel 2013/2016
ABCDEF
1QueueTime TakenVolumesProdnon prod
2Production Queue 101:00:001Production Queue 1Meal Break
3Production Queue 200:30:000Production Queue 2Staff Meeting
4Meal Break00:45:00-System Down
5Production Queue 201:30:002
6Staff Meeting00:20:00-
7Production Queue 101:00:002
8Production Queue 200:45:001
9System Down00:10:00-
Sheet1
Cell Formulas
RangeFormula
E2=IFERROR(INDEX($A$2:$A$9,AGGREGATE(15,6,(ROW($A$2:$A$9)-ROW($A$2)+1)/((MATCH($A$2:$A$9,$A$2:$A$9,0)=ROW($A$2:$A$9)-ROW($A$2)+1)*ISNUMBER($C$2:$C$9)),ROWS(E$2:E2))),"")
F2=IFERROR(INDEX($A$2:$A$9,AGGREGATE(15,6,(ROW($A$2:$A$9)-ROW($A$2)+1)/((MATCH($A$2:$A$9,$A$2:$A$9,0)=ROW($A$2:$A$9)-ROW($A$2)+1)*($C$2:$C$9="-")),ROWS(F$2:F2))),"")
 
Upvote 0
Another way (with Wideboydixon's layout):

In E2 and copy down

=IFERROR(INDEX(A$2:A$9,MATCH(0,INDEX(COUNTIF(E$1:E1,A$2:A$9)+(C$2:C$9="-"),),0)),"")

In F2 and copy down

=IFERROR(INDEX(A$2:A$9,MATCH(0,INDEX(COUNTIF(F$1:F1,A$2:A$9)+(C$2:C$9<>"-"),),0)),"")

Ps: not for a large number of records.

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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