My macro does set a format but doesn't apply it.
When ik select the cell after running the macro and click in it, or press F2, than the format is applied.
I have a range of dates like f.i. 24-4-2015 and want to change it to 24-apr. I made the following macro
The dates turn red immediatly, but for applying the date format i need to click each cell.Sub update() ' ' update Macro ' ' Keyboard Shortcut: Ctrl+q ' Sheets("Coil Source").Select lastrow = ActiveSheet.Cells(Rows.Count, "E").End(xlUp).Row Set Rng = Range("e2:E" & lastrow) For Each cell In Rng cell.NumberFormat = "d-mmm" cell.Font.Color = vbRed Next End Sub
What am i missing?
Any help is appreciated
Bookmarks