I have the following code in my workbook to populate the date in certain cells when the cells are selected. The formula works to populate both ranges. The issue I am running into is formatting the date differently for the two ranges. I need the first range (cell "E4") to format as "mmmm yyyy" which I have done and it works. The other range "G13:G400" needs to format as "mm/dd/yy". Any ideas? I have tried running each range as a separate string, but no luck.
Code:
With ActiveCell
If Intersect(range("E4", "G13:G400"), .Cells) Is Nothing Then Exit Sub
.Value = Date
.NumberFormat = ("mmmm yyyy")
End With