theoretical question

B

Brian L

I have never written a macro so I need some guidance please. I have a query
that pulls data for all of our marketing reps. The query sorts the results
based upon last name. What I would like to do, if possible, is export or
transfer to a spreadsheet the results but put each respective marketing reps
data on a seperate worksheet. Is this possible? If so, where should I begin?

Many thanks!
 
D

David F Cox

It might be best to start from the Excel end and import the data to where
you want it. Excel is well equipped to handle this task in a variety of
ways. For one you can build queries as you want them using Microsoft query.
 
D

DZA via AccessMonster.com

Brian said:
I have never written a macro so I need some guidance please. I have a query
that pulls data for all of our marketing reps. The query sorts the results
based upon last name. What I would like to do, if possible, is export or
transfer to a spreadsheet the results but put each respective marketing reps
data on a seperate worksheet. Is this possible? If so, where should I begin?

Many thanks!

Actually, you probably won't need to write a macro (at least at this stage,
though you might want to have one apply some formatting later on...) As
David suggested, Excel can use Microsoft Query to retrieve data directly out
of your existing query (without modifying it at all) and filter the results
(in MS Query inside your spreadsheet) for a particular rep's name; just set
up the first one on one tab, then create a copy of that tab and edit the MS
Query filter to have *that* tab pull results for a *different* rep, and
repeat for however many reps you have. The really nice thing is that, when
you're done, you can update *ALL* the tabs at *ONCE* by just clicking the
"Refresh All" button on the "External Data" toolbar! (it might take a while,
depending on just how many records your currently existing query returns, etc.
so be patient...)

Good luck and have fun!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top