Olá, Cabral.
Veja se atende.
Fiz as alterações para inserir as datas e para ordenar cada NomeX separadamente, critério a data de início.
Primeiro o código insere os dados referentes a um Nome, ordena os dados daquele nome e por último insere o Nome, a soma dos percentuais e a quantidade de tarefas. And so on.
altere esta linha
ws.Range("A9", ws.Cells(Rows.Count, 1).End(xlUp)).Resize(,
8).ClearContents
e altere as linhas abaixo
Código: Selecionar todos...
...
'##############################################################################################
For Each c In .Range("T1", .Cells(Rows.Count, 20).End(xlUp))
x = 0
'ws.Cells(Rows.Count, 1).End(xlUp)(2, 2) = c.Value ~~~> passei esta linha para baixo
For i = 5 To 14 Step 3
Set k = .Range(.Cells(13, i), .Cells(LR, i)).Find(c.Value, lookat:=xlWhole)
If Not k Is Nothing Then
kAd = k.Address
Do
ws.Cells(Rows.Count, 1).End(xlUp).Cells(2, 1) = .Cells(k.Row, 1)
ws.Cells(Rows.Count, 3).End(xlUp).Cells(2, 1) = .Cells(k.Row, 2)
ws.Cells(Rows.Count, 4).End(xlUp).Cells(2, 1) = Format(k.Offset(, 1).Value, "0%")
ws.Cells(Rows.Count, 7).End(xlUp).Cells(2, 1) = .Cells(k.Row, 17)
ws.Cells(Rows.Count, 8).End(xlUp).Cells(2, 1) = .Cells(k.Row, 18)
Set k = .Range(.Cells(13, i), .Cells(LR, i)).FindNext(k)
x = x + 1
Loop While Not k Is Nothing And k.Address <> kAd
End If
Next i
'ordena o intervalo correspondente ao NomeX
ws.Cells(Rows.Count, 1).End(xlUp).Offset(-x + 1).Resize(x, 8).Sort _
Key1:=ws.Cells(Rows.Count, 7).End(xlUp).Offset(-x + 1), Order1:=xlAscending, Header:=xlNo
ws.Cells(Rows.Count, 4).End(xlUp)(1, 2) = _
Format(Application.Sum(ws.Cells(Rows.Count, 4).End(xlUp).Offset(-x + 1).Resize(x)), "0%")
ws.Cells(Rows.Count, 5).End(xlUp)(-x + 2, 2) = x
ws.Cells(Rows.Count, 1).End(xlUp)(-x + 2, 2) = c.Value
Next c
'###############################################################################################
...
...
Osvaldo
Quatro coisas que odeio: preguiçosos, políticos, Google planilhas e Outlook

Anexe arquivos diretamente no fórum:
+ Resposta / Adicionar um anexo / Selecione o arquivo
CÉLULAS MESCLADAS PODEM AFETAR FÓRMULAS E MACROS.