Excel – How to format a month in mmm format


I am trying to format a date in Excel with VBA, the current month to be in mmm format. Somehow I am getting the previous month, instead of the current month. I have checked and my computer month is Feb, but I am getting Jan, instead.

This is my code:

Cells(1, 2) = Format(month(Date), "mmm")

Best Solution

Just format the existing date directly, ie

Cells(1, 2) = Format(Date, "mmm")