UNIQUE formula in VBA - Referencing Table Columns

losamfr17

Board Regular
Joined
Jun 10, 2016
Messages
149
Hi,

In my code I am using the following statement to create a UNIQUE listing of values for the specified columns.
VBA Code:
Sheets("Plan Rollup").Range("M2").Formula = "=UNIQUE(tbl_Plans[[DoorID]:[Tab Name]])"
However, when I run the code the following formula actually appears in cell M2:
=@UNIQUE(tbl_Plans[[DoorID]:[Tab Name]])
The impact is that the SPILL aspect does not work because of the "=@..." instead of "=...". The "@" comes on its own and I don't get why. A single value appears in range M2 instead of the whole unique listing of values. When I remove the "@" manually the formula works fine.

Any idea what's causing the "@" to appear and how to work around it?

Thank you.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
For any array formula you need to use Formula2, rather than Formula
 
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top