HighAndWilder
Well-known Member
- Joined
- Nov 4, 2006
- Messages
- 907
- Office Version
- 365
- Platform
- Windows
I am writing a formula using the UNIQUE function to a cell using VBA and Excel inserts a '@' character after the = sign.
becomes =@UNIQUE(Data!A2:Data!A13,FALSE) in the cell.
This does not produce a unique list of values in the A2:A13 range but just returns the first value in the list.
If I remove this character manually, the formula works as expected.
Does anybody have any idea how I can avoid this happening?
Thanks
VBA Code:
Set Ws = worksheets("Results")
Ws.Range("A1").Formula = "=UNIQUE(" & wsStart.Name & "!A2:" & wsStart.Name & "!A13,FALSE,FALSE)"
becomes =@UNIQUE(Data!A2:Data!A13,FALSE) in the cell.
This does not produce a unique list of values in the A2:A13 range but just returns the first value in the list.
If I remove this character manually, the formula works as expected.
Does anybody have any idea how I can avoid this happening?
Thanks