I have a workbook which I am copying a function from and placing it in to a cell in another workbook. The copy code is working but it's adding a number of @ symbols.
This is the code to copy:
wsDestinationSheet.Range("W2").Formula = SheetSource.Range("W2").Formula
and this is the resulting formula in the new workbook:
=@IF((AllStaffProjectAllocationTbl[@[Start Date]]<DATE(YEAR(@W1:YE1),MONTH(@W1:YE1)+1,1))*(AllStaffProjectAllocationTbl[@[End Date]]>=@W1:YE1),AllStaffProjectAllocationTbl[Employee],"")
If I edit the new workbook and remove the @ symbols manually so the formula becomes the following -
=IF((AllStaffProjectAllocationTbl[Start Date]<DATE(YEAR(W1:YE1),MONTH(W1:YE1)+1,1))*(AllStaffProjectAllocationTbl[End Date]>=W1:YE1),AllStaffProjectAllocationTbl[Employee],"")
Then everything works fine. Does anyone know why it's adding the @ symbols and if there's a way to remove them?