I am trying to format my cells with dates to dd-mmm. I tried the follwing code but VBA laughs, makes yo-momma jokes at me then moves to the next step without changing a thing.
(CellDate - a Date variable)
If IsDate(.Cells(V, 5)) Then
CellDate = .Cells(V, 5)
CellDate = Format(CellDate, "dd-mmm")
'.Cells(V, 5) = CellDate Didnt Work
'.Cells(V, 5) = Format(.Cells(V, 5), "dd-mmm") Didnt Work
.Cells(V, 5).NumberFormat = Date 'Doesnt Work Either
End If
(CellDate - a Date variable)
If IsDate(.Cells(V, 5)) Then
CellDate = .Cells(V, 5)
CellDate = Format(CellDate, "dd-mmm")
'.Cells(V, 5) = CellDate Didnt Work
'.Cells(V, 5) = Format(.Cells(V, 5), "dd-mmm") Didnt Work
.Cells(V, 5).NumberFormat = Date 'Doesnt Work Either
End If