Automating Splitting one worksheet

  • Thread starter Thread starter FJB
  • Start date Start date
F

FJB

We pull information from an Access database using a select query and
convert the result to Excel. Now we have to change the column widths to
handle the information and separate the information by Region. Is it
possible to create a macro of VBA code to help do this more
effectively, change the column width on the initial worksheet and then
creat worksheets for each region and populating them with their data.
We moving from a monthly report to a weekly report and automation is
really needed. Thanks for our help.

Frank
 
Frank,
Can't you edit the SQL to use "<SQL SELECT text> WHERE Region=?", then
..Refresh the query.
Copy/paste or Pastespecial the results to desired/new WS.
Repeat for next region.

As for column widths, look into .AutoFit, if that's what you mean.

NickHK
 

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

Back
Top