So I have some data in some spreadsheets and I’ve found that for all the macros and filtering and forumlas I’ve written to simplify it and narrow it down to what I want, it would have been much easier to just write some SQL against a few tables.
I guess I’m wondering: is it possible to have a macro in a workbook that queries data in some sheets and then populates another sheet with the result set? If so, how would I do it?
(It is Excel 2003)
No need for a macro for this.
Go to
DATA-> Import External Data -> Import Datathen basically follow the prompts. You may need to make a new data connection, (New Sourceat the bottom) but once connected you can write queries natively in Excel.I’m guessing someone familiar with DBs would be able to figure it out pretty quickly. If not, here’s a tutorial.