Hello experts,
I have the following the dataset.
[TABLE="width: 492"]
<colgroup><col width="111" style="width: 83pt;"><col width="99" style="width: 74pt;"><col width="91" style="width: 68pt;"><col width="103" style="width: 77pt;"><col width="88" style="width: 66pt;"></colgroup><tbody>[TR]
[TD="width: 111, bgcolor: #5B9BD5"]Queue[/TD]
[TD="width: 99, bgcolor: #5B9BD5"]Start Time[/TD]
[TD="width: 91, bgcolor: #5B9BD5"]End Time[/TD]
[TD="width: 103, bgcolor: #5B9BD5"]Production[/TD]
[TD="width: 88, bgcolor: #5B9BD5"]Volumes[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Queue 1[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]19:00:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]20:00:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]2[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Comfort Break[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]20:00:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]20:10:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Queue 2[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]20:10:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]21:30:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]3[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Team Meeting[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]21:30:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]22:00:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Queue 1[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]22:00:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]22:15:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]1[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Queue 3[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]22:15:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]23:30:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]5[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Staff Reviews[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]23:30:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]0:10:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Queue 4[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]0:10:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]0:40:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]2[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Meal Break[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]0:40:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]1:30:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Queue 2[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]1:30:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]2:00:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]1[/TD]
[/TR]
</tbody>[/TABLE]
And FormR has helped me achieve the following result with the given code.
Result :
[TABLE="width: 103"]
<colgroup><col width="103" style="width: 77pt;"></colgroup><tbody>[TR]
[TD="width: 103"]Production[/TD]
[/TR]
[TR]
[TD="bgcolor: #D9E1F2"]Queue 1[/TD]
[/TR]
[TR]
[TD]Queue 2[/TD]
[/TR]
[TR]
[TD="bgcolor: #D9E1F2"]Queue 3[/TD]
[/TR]
[TR]
[TD]Queue 4[/TD]
[/TR]
</tbody>[/TABLE]
Code :
=INDEX($A$2:$A$99,AGGREGATE(15,6,(ROW($A$2:$A$99)-ROW($A$2)+1)/((MATCH($A$2:$A$99,$A$2:$A$99,0)=ROW($A$2:$A$99)-ROW($A$2)+1)*($D$2:$D$99="P")),ROWS(E$1:E1)))
Result :
[TABLE="width: 135"]
<colgroup><col width="135" style="width: 101pt;"></colgroup><tbody>[TR]
[TD="width: 135, bgcolor: #70AD47"]Non Production[/TD]
[/TR]
[TR]
[TD="bgcolor: #E2EFDA"]Comfort Break[/TD]
[/TR]
[TR]
[TD]Team Meeting[/TD]
[/TR]
[TR]
[TD="bgcolor: #E2EFDA"]Staff Reviews[/TD]
[/TR]
[TR]
[TD]Meal Break[/TD]
[/TR]
</tbody>[/TABLE]
Code :
=INDEX($A$2:$A$99,AGGREGATE(15,6,(ROW($A$2:$A$99)-ROW($A$2)+1)/((MATCH($A$2:$A$99,$A$2:$A$99,0)=ROW($A$2:$A$99)-ROW($A$2)+1)*($D$2:$D$99="N")),ROWS(F$1:F1)))
This works brilliantly however I have a new criteria requirement. I need to separate the non production table into further 2 categories like below.
Desired result :
[TABLE="width: 334"]
<colgroup><col width="135" style="width: 101pt;"><col width="87" style="width: 65pt;"><col width="112" style="width: 84pt;"></colgroup><tbody>[TR]
[TD="width: 135, bgcolor: #70AD47"]Non Production[/TD]
[TD="width: 87"][/TD]
[TD="width: 112, bgcolor: #5B9BD5"]Breaks[/TD]
[/TR]
[TR]
[TD="bgcolor: #E2EFDA"]Team Meeting[/TD]
[TD][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Meal break[/TD]
[/TR]
[TR]
[TD]Staff Reviews[/TD]
[TD][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Comfort Break[/TD]
[/TR]
</tbody>[/TABLE]
Breaks are limited to Meal Break, Comfort Break and Sick Leave. Non production codes can vary and is not limited to a list rather it will be marked with a "N" in Column D in the dataset.
Any help will be hugely appreciated.
Thank you.
I have the following the dataset.
[TABLE="width: 492"]
<colgroup><col width="111" style="width: 83pt;"><col width="99" style="width: 74pt;"><col width="91" style="width: 68pt;"><col width="103" style="width: 77pt;"><col width="88" style="width: 66pt;"></colgroup><tbody>[TR]
[TD="width: 111, bgcolor: #5B9BD5"]Queue[/TD]
[TD="width: 99, bgcolor: #5B9BD5"]Start Time[/TD]
[TD="width: 91, bgcolor: #5B9BD5"]End Time[/TD]
[TD="width: 103, bgcolor: #5B9BD5"]Production[/TD]
[TD="width: 88, bgcolor: #5B9BD5"]Volumes[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Queue 1[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]19:00:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]20:00:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]2[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Comfort Break[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]20:00:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]20:10:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Queue 2[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]20:10:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]21:30:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]3[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Team Meeting[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]21:30:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]22:00:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Queue 1[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]22:00:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]22:15:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]1[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Queue 3[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]22:15:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]23:30:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]5[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Staff Reviews[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]23:30:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]0:10:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Queue 4[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]0:10:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]0:40:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]2[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Meal Break[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]0:40:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: right"]1:30:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]N[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] , align: center"]-[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Queue 2[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]1:30:00[/TD]
[TD="class: xl63, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: right"]2:00:00[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P[/TD]
[TD="class: xl64, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]1[/TD]
[/TR]
</tbody>[/TABLE]
And FormR has helped me achieve the following result with the given code.
Result :
[TABLE="width: 103"]
<colgroup><col width="103" style="width: 77pt;"></colgroup><tbody>[TR]
[TD="width: 103"]Production[/TD]
[/TR]
[TR]
[TD="bgcolor: #D9E1F2"]Queue 1[/TD]
[/TR]
[TR]
[TD]Queue 2[/TD]
[/TR]
[TR]
[TD="bgcolor: #D9E1F2"]Queue 3[/TD]
[/TR]
[TR]
[TD]Queue 4[/TD]
[/TR]
</tbody>[/TABLE]
Code :
=INDEX($A$2:$A$99,AGGREGATE(15,6,(ROW($A$2:$A$99)-ROW($A$2)+1)/((MATCH($A$2:$A$99,$A$2:$A$99,0)=ROW($A$2:$A$99)-ROW($A$2)+1)*($D$2:$D$99="P")),ROWS(E$1:E1)))
Result :
[TABLE="width: 135"]
<colgroup><col width="135" style="width: 101pt;"></colgroup><tbody>[TR]
[TD="width: 135, bgcolor: #70AD47"]Non Production[/TD]
[/TR]
[TR]
[TD="bgcolor: #E2EFDA"]Comfort Break[/TD]
[/TR]
[TR]
[TD]Team Meeting[/TD]
[/TR]
[TR]
[TD="bgcolor: #E2EFDA"]Staff Reviews[/TD]
[/TR]
[TR]
[TD]Meal Break[/TD]
[/TR]
</tbody>[/TABLE]
Code :
=INDEX($A$2:$A$99,AGGREGATE(15,6,(ROW($A$2:$A$99)-ROW($A$2)+1)/((MATCH($A$2:$A$99,$A$2:$A$99,0)=ROW($A$2:$A$99)-ROW($A$2)+1)*($D$2:$D$99="N")),ROWS(F$1:F1)))
This works brilliantly however I have a new criteria requirement. I need to separate the non production table into further 2 categories like below.
Desired result :
[TABLE="width: 334"]
<colgroup><col width="135" style="width: 101pt;"><col width="87" style="width: 65pt;"><col width="112" style="width: 84pt;"></colgroup><tbody>[TR]
[TD="width: 135, bgcolor: #70AD47"]Non Production[/TD]
[TD="width: 87"][/TD]
[TD="width: 112, bgcolor: #5B9BD5"]Breaks[/TD]
[/TR]
[TR]
[TD="bgcolor: #E2EFDA"]Team Meeting[/TD]
[TD][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=BDD7EE]#BDD7EE[/URL] "]Meal break[/TD]
[/TR]
[TR]
[TD]Staff Reviews[/TD]
[TD][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] "]Comfort Break[/TD]
[/TR]
</tbody>[/TABLE]
Breaks are limited to Meal Break, Comfort Break and Sick Leave. Non production codes can vary and is not limited to a list rather it will be marked with a "N" in Column D in the dataset.
Any help will be hugely appreciated.
Thank you.