mmmh, what I meant is:
<STYLE>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl64 { font-size: 11pt; font-family: "Calibri (Body)"; text-align: center; vertical-align: middle; border: 0.5pt solid windowtext; white-space: normal; }.xl65 { font-size: 11pt; font-family: "Calibri (Body)"; text-align: center; vertical-align: middle; border: 0.5pt solid windowtext; background: none repeat scroll 0% 0% rgb(218, 238, 243); white-space: normal; }.xl66 { font-size: 11pt; font-family: "Calibri (Body)"; text-align: center; vertical-align: middle; border: 0.5pt solid windowtext; background: none repeat scroll 0% 0% rgb(253, 233, 217); white-space: normal; }.xl67 { text-align: center; border: 0.5pt solid windowtext; }.xl68 { font-size: 11pt; font-family: "Calibri (Body)"; text-align: center; vertical-align: middle; border: 0.5pt solid windowtext; background: none repeat scroll 0% 0% rgb(228, 223, 236); white-space: normal; }.xl69 { font-weight: 700; text-decoration: underline; font-family: Calibri; vertical-align: middle; white-space: normal; }</STYLE>[TABLE="width: 390"]
<TBODY>[TR]
[TD="class: xl69, width: 65"]cdt1
[/TD]
[TD="class: xl64, width: 65"]cdt2
[/TD]
[TD="class: xl65, width: 65"]Week 1
[/TD]
[TD="class: xl65, width: 65"]Week 2
[/TD]
[TD="class: xl65, width: 65"]Week 3
[/TD]
[TD="class: xl65, width: 65"]Week 4
[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 65"]Nicola
[/TD]
[TD="class: xl68, width: 65"]S
[/TD]
[TD="class: xl67"]T
[/TD]
[TD="class: xl67"]V
[/TD]
[TD="class: xl67"]T
[/TD]
[TD="class: xl67"]D
[/TD]
[/TR]
</TBODY>[/TABLE]
cdt1 Nicola
cdt2 S
cdt3 T (two T within cdt1 and cdt2)
result expected is week1 and week3
does this clarifies my query?
Apparently, I overlooked the different week occurrences in the second case...
[TABLE="width: 640"]
<TBODY>[TR]
[TD="class: xl64, width: 97, bgcolor: white"][/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
Rank
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
Week 1
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
Week 2
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
Week 3
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
Week 4
[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"][/TD]
[TD="class: xl65, width: 70, bgcolor: white"]
cdt1
[/TD]
[TD="class: xl64, width: 80, bgcolor: white"]
Nicola
[/TD]
[TD="class: xl64, width: 75, bgcolor: white"][/TD]
[TD="class: xl64, width: 64, bgcolor: white"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Nicola
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
S
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
D
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl65, width: 70, bgcolor: white"]
cdt2
[/TD]
[TD="class: xl64, width: 80, bgcolor: white"]
S
[/TD]
[TD="class: xl64, width: 75, bgcolor: white"][/TD]
[TD="class: xl64, width: 64, bgcolor: white"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Kevin
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
P
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
D
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl65, width: 70, bgcolor: white"]
cdt3
[/TD]
[TD="class: xl64, width: 80, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 75, bgcolor: white"][/TD]
[TD="class: xl64, width: 64, bgcolor: white"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Nicola
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
N
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
V
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl65, width: 70, bgcolor: white"]
count
[/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
2
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Sam
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
S
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
T
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl65, width: 70, bgcolor: white"]
result
[/TD]
[TD="class: xl63, bgcolor: transparent"]
Week 1
[/TD]
[TD="class: xl63, bgcolor: transparent"]
Week 3
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Peter
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
P
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
D
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Peter
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
D
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Roger
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
V
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Kevin
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
A
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
D
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
D
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Michael
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
Q
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
T
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
V
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl64, width: 97, bgcolor: white"]
Peter
[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
W
[/TD]
[TD="class: xl64, width: 82, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 88, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 87, bgcolor: white"]
V
[/TD]
[TD="class: xl64, width: 81, bgcolor: white"]
V
[/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[TD="class: xl63, bgcolor: transparent"][/TD]
[/TR]
</TBODY>[/TABLE]
I4, control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF($A$2:$A$11=$I$1,IF($B$2:$B$11=$I$2,
IF($C$2:$F$11=$I$3,COLUMN($C$1:$F$1)))),COLUMN($C$1:$F$1)),1))
I5, control+shift+enter and copy across:
Rich (BB code):
=IF(COLUMNS($I$5:I5)<=$I$4,INDEX($C$1:$F$1,MIN(IF($A$2:$A$11=$I$1,
IF($B$2:$B$11=$I$2,IF($C$2:$F$11=$I$3,IF(ISNA(MATCH($C$1:$F$1,$H$5:H5,0)),
COLUMN($C$1:$F$1)-COLUMN($C$1)+1)))))),"")