Home Creating a new column title in VBA
 I have a spreadsheet which looks like the below: I am trying to write a macro (and ultimately a button) which will create a new column with the current date as a header in the first empty column i.e. next to april it will say May if I run it when it is May. This is what I have tried so far, but it doesn't work: Sub column() Dim Input_ID As String, Date_in As String Dim ws As Worksheet Set ws = ThisWorkbook.Sheets("Facebook") Date_in = Format(Now, "MMM-YY") With ws.Range("2" & ws.Columns.Count).End(xlUp) If .column >= c Then .Offset(1, 0).Value = Date_in Else Exit Sub End With End Sub