![]() |
How to get Excel to retrieve aggregate data from Access
I'm trying to get aggregate data (SUM) from a multitable .mdb in Access using
an Excel VBA macro. The aggregate uses three tables and four or five limiting criteria. I'm simply trying to retrieve a single aggregate figure from Access rather than a worksheet full of data that requires further Excel calculations. |
How to get Excel to retrieve aggregate data from Access
For a single cell query like this it is easiest to use the worksheet function
SQL.REQUEST (see Help for details). Your SQL query can return a sum and you can effectively have "parameters" if you concatenate cell values as part of your query string, e.g: "SELECT SUM(PROFIT) FROM SALES WHERE STATE='"&A1&"'") -- - K Dales "Don MacKinnon" wrote: I'm trying to get aggregate data (SUM) from a multitable .mdb in Access using an Excel VBA macro. The aggregate uses three tables and four or five limiting criteria. I'm simply trying to retrieve a single aggregate figure from Access rather than a worksheet full of data that requires further Excel calculations. |
All times are GMT +1. The time now is 03:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com