So this macro inserts 2 columns in C and D. Then fills this formula all the way down column C.
Option Explicit
Sub Format_dates()
Dim ws As worksheet
Dim lst As Long
Dim i As Long
Dim r As Long
Columns("C:D").Insert Shift:=xlToRight
Range("C2").Value = "START DATE"
Range("D2").Value = "END DATE"
Range("A" & Cells.Rows.Count).End(xlUp).Offset(0, 3).Select
With ActiveSheet ' ("MASTER Business Events Calendar")
lst = ws.Cells(.Rows.Count, 2).End(xlUp).row
For i = 3 To lst
r = Cells.row
ws.Cells(i, 3) = "=IF(ISNUMBER(B&r),B&r,DATEVALUE(TRIM(LEFT(B&r,FIND("-",SUBSTITUTE(B&r,CHAR(150),"-")&"-")-1))&", "&RIGHT(B&r,4)))"
Next i
End With
End Sub
Can I not substitute variables in formulas like I do with python?