I have a table like this one, and I want to extract the month as a number (1 to 12)
I tried to do something like
For i = 2 To 1165
StartMonth2 = Range("G" & i).Value
StartMonth = Month(StartMonth2)
Next i
but this doesn't work because the month is not part of a date, is just on a column on its own.
I also tried the TEXT formula, something like =TEXT(G2, 'm') but again, the same issue.
Is there a function in VBA that can help me extract the month number easily?