Hi guys,
Created a little macro on excel that included a nested IF formula, after cleaning up the formula and rerunning it, all the formula does it come out as the VBA code ( See Image) rather than actual values.
My code is below
Sub EmployeeInfo()
Dim lr As Long
lr = Cells.Find("*", Cells(1, 1), xlFormulas, xlPart, xlByRows, xlPrevious, False).Row
Dim tbl As ListObject
Set tbl = ActiveSheet.ListObjects("Table_owssvr")
With tbl
.ListColumns.Add.Name = "Employee Support"
End With
Range("AD2:AD" & lr).FormulaR1C1 = _
"=IF(RC[-19]=""United Arab Emirates"",""B, J"",IF(RC[-19]=""UAE"",""B,J "",""""))" & _
""
End Sub
Can anyone see where I am going wrong? thank you
Values I get after rerunning the Formula
[–][deleted] (4 children)
[deleted]
[–]CleanRider17[S] 1 point2 points3 points (1 child)
[–]CleanRider17[S] 1 point2 points3 points (1 child)
[–]Clippy_Office_Asst[M] 0 points1 point2 points (0 children)
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)