I have a sheet where Col A lists (thousands) of dates, and in Col C the respective months are calculated.
I do this with the below code, however this takes a few second (over 100K dates).
Any way to speed this up ?
Thanks.
I do this with the below code, however this takes a few second (over 100K dates).
Any way to speed this up ?
Thanks.
VBA Code:
Private Sub Worksheet_Activate()
Dim i As Long
Dim nRow As Long
nRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To nRow
Range("C" & i).Formula = "=TEXT(A" & i & ",""yyyy/mm"")"
Next i
End Sub