I can't believe this is so hard. I think I've seen 100 answers on EE to this exact question and I still can't figure it out.
I have a SQL Server database with a table called Branches. I want to type a branch number into cell B7 of my spreadsheet and have Excel go out to SQL Server and get all of the information for the specified branch.
In Excel I went to Data > Import External Data > New Databse Query
I found the table.
I was able to create the following SQl... select * from "Autopart"."dbo"."Branches" where branch = '2024'
The problem is that I had to hard code the value 2024 when I really want it to look at cell B7 and use whatever value it finds.
I know nothing about VBA or ADO.
From everything I've read it seems quite doable, I just can't figure it out.
Does anybody have any "dummy" level instructions that might help me?