I have a few worksheets that use sql queries to retrieve data. I would like all of these sheets to query data based on the same date range entered by a user in excel.
eg. I would enter somewhere in a form or in a cell a date range and retrieve the value in sql to obtain data based on 开发者_JAVA技巧the user specified dates.
Is there anyway to access values from forms or from cells in SQL (Query editor perhaps)?
In MS Query (which you use to build a QueryTable) set the tick to display the Criteria grid, and for required fields enter something in brackets as a criterion value:
A screenshot http://img228.imageshack.us/img228/4593/97662427.gif
This will create two parameters in the query.
Save and return to Excel, right-click the QueryTable, click Parameters... and point them to the right cells.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论