Sort Worksheets with a Workbook

K

Kate G.

Is it possible to sort Worksheets within an individual workbook (File).

I know how to do it manually -- clicking and dragging each into position.

Is there a way to do them all at once. With dozens of sheets... this will
be a time consuming task. And then there are multiple files!

I am using Excel 2003.
 
N

Niek Otten

Hi Kathryn,

Look here:

http://www.cpearson.com/excel/sortws.aspx

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Is it possible to sort Worksheets within an individual workbook (File).
|
| I know how to do it manually -- clicking and dragging each into position.
|
| Is there a way to do them all at once. With dozens of sheets... this will
| be a time consuming task. And then there are multiple files!
|
| I am using Excel 2003.
|
| --
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Kathryn Groves
|
|
|
 
K

Kate G.

That looks like that will do the trick.. but I must admit -- I don't know
how to do it.

I know how to record macros... but have never done anything in VB.

Can you give me pointers on how to set this up?

Sorry I'm not smarter! :)
 
N

Niek Otten

Hi Kathryn,

ALT+F11 gets you to the VB Editor (VBE).
Insert>Module. Paste the text of the macro in the Module.
ALT+F11 brings you back to the Worksheet.
From there it's the same as a recorded macro.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


| That looks like that will do the trick.. but I must admit -- I don't know
| how to do it.
|
| I know how to record macros... but have never done anything in VB.
|
| Can you give me pointers on how to set this up?
|
| Sorry I'm not smarter! :)
|
| --
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Kathryn Groves
|
|
| | > Hi Kathryn,
| >
| > Look here:
| >
| > http://www.cpearson.com/excel/sortws.aspx
| >
| > --
| > Kind regards,
| >
| > Niek Otten
| > Microsoft MVP - Excel
| >
| > | > | Is it possible to sort Worksheets within an individual workbook (File).
| > |
| > | I know how to do it manually -- clicking and dragging each into
| > position.
| > |
| > | Is there a way to do them all at once. With dozens of sheets... this
| > will
| > | be a time consuming task. And then there are multiple files!
| > |
| > | I am using Excel 2003.
| > |
| > | --
| > |
| > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| > | Kathryn Groves
| > |
| > |
| > |
| >
| >
|
|
 
K

Kate G.

Okay -- I'm really stupid. I can copy the text and paste it in... but I
don't understand how to save it... or how to run it.

When I go to Macros -- nothing is listed (except the ones I have created).

Is there some place I can read about the VERY BASIC FUNDAMENTALS of VB
Editing?
 
G

Gord Dibben

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module.

Copy the macro from Chip's site.

Paste the code into the created module.

Save the workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to Tool>Macro>Macros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP
 

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