Sub PasteRMRegFunc()mydate = Format(Month(Date - 1), "00") & Format(Day(Date - 1), "00")Selection.Formula = "=VLOOKUP(D" & ActiveCell.Row & ",RMRegArray" &mydate & ",8,FALSE)"End Sub