My bad - INDEX was missing in Evaluate's argument.
The fixed code is as follows:
Sub AllYouWant()
Dim a As Range
' Trim the time part from the date+time constants in A-Column
With Intersect(ActiveSheet.UsedRange, Columns("A"))
For Each a In .SpecialCells(xlCellTypeConstants, xlNumbers).Areas
a.Value = Evaluate("INDEX(TRUNC(" & a.Address & "),)")
Next
.NumberFormat = "yyyy/mm/dd"
End With
' Round to the nearest 5*N the numeric constants in E-column
With Intersect(ActiveSheet.UsedRange, Columns("E"))
For Each a In .SpecialCells(xlCellTypeConstants, xlNumbers).Areas
a.Value = Evaluate("INDEX(ROUND(" & a.Address & "*2,-1)/2,)")
Next
End With
' Write formula to the bottom cell in E-column to sum the cells above
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData
With Cells(Rows.Count, "E").End(xlUp)
If .HasFormula Then
If .Formula Like "=SUM(*E*:*E*)" Then
.Formula = "=SUM(E1:E" & .Row - 1 & ")"
End If
Else
.Offset(1).Formula = "=SUM(E1:E" & .Row & ")"
End If
End With
End Sub
The code should be in standard module (VBE - menu Insert - Module), not in the sheet's one.
The fixed example is attached.