We can put the sheet in an automatic event, so every time you update the sheet, the macro will also run.
Put the following formula in cell, for example, B"
=TODAY()
Put the following code in the events of your sheet
Code:
Private Sub Worksheet_Calculate()
Dim datos As Range, i As Long, n As Long
On Error GoTo AppEna
Application.EnableEvents = False
Set datos = Range("A3", Range("A" & Rows.Count).End(xlUp))
For i = 3 To datos.Rows.Count
n = WorksheetFunction.CountIf(datos.Columns(1), datos(i, 1))
With datos(i - 2, 1).Resize(n, 1).Offset(, 2)
.Formula = "=RANK(B" & i & ",$B$" & i & ":$B$" & i + n - 1 & ",1)"
.Value = .Value
End With
i = i + n - 1
Next
AppEna:
Application.EnableEvents = False
End Sub
SHEET EVENT
Right click the tab of the sheet you want this to work, select view code and paste the code into the window that opens up.