I am using office 365 and I am creating a WB for someone who is using excel 2016. My code inserts a "IFS" formula in all the cells of a column to the last row. The issues is IFS is not available in 2016 so the code fails for them but works for me. Is there a way to change the following code to work in 2016? When they run the macro the get #NAME?
Dim Lastrow As Long
Lastrow = Range("A" & Rows.Count).End(xlUp).Row
Range("G2").Select
ActiveCell.FormulaR1C1 = _
"=IFS(RC[-2]=""2nd Shift 1.05"",""2"", RC[-2]=""2nd Shift
Overtime"",""2"",TRUE,"""")"
Range("G2").Select
Selection.AutoFill Destination:=Range("G2:G" & Lastrow)
Range("E2").Select
End Sub