This solution uses SQL Server 2012 and the AdventureWorksDW2012 database, so if you don't currently have it then click here to download and install.Data in SQL Server, although this solution can work with any database with a saved Stored Procedure.What is needed for you to create this solution The link to AdventureWorksDW2012 database is here, and the completed Excel doc used in this article is here.
This is also a walk-through of Excel named ranges, data validation, data connections, Excel VBA, and SQL Server Stored Procedures. The finished product, which also is an Excel download at the end of this article, is here: Hey Bob, can I get a report that shows the number of aardvarks in every zoo? Hey Bob, can I get a report that shows the number of flights out of St. Hey Bob, you know that thing you ran for me last week? Run it again for last month. Hey Bob, run me my favorite report for July. Hey Bob, run me my favorite report for June. Hey Bob, run me my favorite report for April. This article targets this common scenario for anyone that can execute SQL Server T-SQL: