I have the following line of code that should place a formula in a cell.
The desired formula result should be: =IFERROR(UNIQUE(FILTER(Log!$E$2:$E$100, Log!$E$2:$E$100<>"")), "")
However, what I actually get is : =@IFERROR(UNIQUE(FILTER(Log!$E$2:$E$100, Log!$E$2:$E$100<>"")), "")
If I manually go into the cell and remove the "@" symbol, the formula works. How can I put that formula into the cell without manual intervention for it to work?
VBA Code:
ThisWorkbook.Worksheets("Log").Range("AA1").Formula = "=IFERROR(UNIQUE(FILTER(Log!$E$2:$E$100, Log!$E$2:$E$100<>" & Chr(34) & Chr(34) & ")), " & Chr(34) & Chr(34) & ")"
The desired formula result should be: =IFERROR(UNIQUE(FILTER(Log!$E$2:$E$100, Log!$E$2:$E$100<>"")), "")
However, what I actually get is : =@IFERROR(UNIQUE(FILTER(Log!$E$2:$E$100, Log!$E$2:$E$100<>"")), "")
If I manually go into the cell and remove the "@" symbol, the formula works. How can I put that formula into the cell without manual intervention for it to work?