I have currently added a fictitious name to each month and that fixed the error. When I remove the fictitious name I do not get an error on the line you proposed, I only get one there if there is a duplicate name with the same date.
I still only get the error For i = 1 To UBound(ar, 1) when the first line is empty, and of course that is the Runtime error 13, type mismatch error.
When I hover over it:
the i = 2977, UBound = UBound(ar,1)=<Type mismatch> , ar = Empty

Does that help any?