I have a macro that output a month based upon a date that has been entered in a row on my spreadsheet. I want the macro to center the text but im not sure of the syntax, the macro code is below:
Can anyone help![]()
Sub calculateMonthRegistered() ' Lr = "Last Row" Dim Lr As Long Lr = Range("J" & Rows.Count).End(xlUp).Row 'Refers to Cells 1 = "1" and 3 = Column "C" With Cells(2, 43).Resize(Lr - 1, 1) .Formula = "=TEXT(J2,""mmm-yy"")" .Font.ColorIndex = 3 .Font.Bold = True End With End Sub
Bookmarks