Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49895

Referencing a Column Header that contains '#' in its title

$
0
0
I'm having an issue where I would like to reference a column based on its header in one of the tables on my sheet, however because there is a '#' sign in the header name it is throwing me a 1004 error.

I've tried using a variable and chr(35) with no luck, does anyone have the solution to my issue?

Code:

set searchData = Range("MasterTable[# of Searches]")
The table is created from a connection and is then transfered to another sheet so renaming the column is not an optimal solution for me

Viewing all articles
Browse latest Browse all 49895

Trending Articles