Excel SQL addIn use namedrange in sql

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Solved1.83K views

Good day and thanks very much for the SQL Addin.

I wonder if it is possible to use a named cell in a sql where close for exemple ?

I mean, if I named sheet1!$A$1 as Name1 and in sql I would like to :
select * from anytalble where somehing = [Name1]

selected answer

Sure you can but you need to treat the named range as a table. See my example below – all on a single worksheet.

selected as best answer

Simply the best place to learn Excel VBA