Actually the below should work for both (adjust the ranges to suit)...
Excel 2016 (Windows) 64 bit
| A | B |
---|
Name | | |
Ann | Ann | |
Ann | Betty | |
Betty | Carol | |
Carol | | |
Carol | | |
Ann | | |
Ann | | |
Betty | | |
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"][/TD]
</tbody>
Sheet1
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F0E0E0]#F0E0E0[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F0E0E0]#F0E0E0[/URL] "]B2[/TH]
[TD="align: left"]=IFERROR([COLOR=rgb(255]INDEX($A$2:$A$11, MATCH([COLOR=0)]0, INDEX([COLOR=rgb(0]COUNTIF($B$1:B1, $A$2:$A$11), 0, 0[/COLOR]), 0[/COLOR])), ""[/COLOR])[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F0E0E0]#F0E0E0[/URL] "]B3[/TH]
[TD="align: left"]=IFERROR([COLOR=rgb(255]INDEX($A$2:$A$11, MATCH([COLOR=0)]0, INDEX([COLOR=rgb(0]COUNTIF($B$1:B2, $A$2:$A$11), 0, 0[/COLOR]), 0[/COLOR])), ""[/COLOR])[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F0E0E0]#F0E0E0[/URL] "]B4[/TH]
[TD="align: left"]=IFERROR([COLOR=rgb(255]INDEX($A$2:$A$11, MATCH([COLOR=0)]0, INDEX([COLOR=rgb(0]COUNTIF($B$1:B3, $A$2:$A$11), 0, 0[/COLOR]), 0[/COLOR])), ""[/COLOR])[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F0E0E0]#F0E0E0[/URL] "]B5[/TH]
[TD="align: left"]=IFERROR([COLOR=rgb(255]INDEX($A$2:$A$11, MATCH([COLOR=0)]0, INDEX([COLOR=rgb(0]COUNTIF($B$1:B4, $A$2:$A$11), 0, 0[/COLOR]), 0[/COLOR])), ""[/COLOR])[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]