ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sorting Worksheet Tabs (https://www.excelbanter.com/excel-worksheet-functions/31188-sorting-worksheet-tabs.html)

Jaqi

Sorting Worksheet Tabs
 
How do I sort worksheets in a workbook based on tab text?

JE McGimpsey

See

http://cpearson.com/excel/sortws.htm

In article ,
"Jaqi" wrote:

How do I sort worksheets in a workbook based on tab text?


janabanana

Sorting Worksheet Tabs
 
I visited the link below and see the function to sort by tab(sheet) name, but
I do not know where to type this function in. I don't know what all of the it
means, but I thought I would poke at it until I make it work for me.
--
jana


"JE McGimpsey" wrote:

See

http://cpearson.com/excel/sortws.htm

In article ,
"Jaqi" wrote:

How do I sort worksheets in a workbook based on tab text?



janabanana

Sorting Worksheet Tabs
 
i copied and pasted it into visual basic. i substituted FirstToSort with
Sheet1.
am i on the right path?
i have 311 sheets. each sheet is a person's name.
help???
--
jana


"janabanana" wrote:

I visited the link below and see the function to sort by tab(sheet) name, but
I do not know where to type this function in. I don't know what all of the it
means, but I thought I would poke at it until I make it work for me.
--
jana


"JE McGimpsey" wrote:

See

http://cpearson.com/excel/sortws.htm

In article ,
"Jaqi" wrote:

How do I sort worksheets in a workbook based on tab text?



Gord Dibben

Sorting Worksheet Tabs
 
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 InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

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


Gord Dibben MS Excel MVP


On Tue, 15 Jul 2008 12:08:02 -0700, janabanana
wrote:

I visited the link below and see the function to sort by tab(sheet) name, but
I do not know where to type this function in. I don't know what all of the it
means, but I thought I would poke at it until I make it work for me.



Dave Peterson

Sorting Worksheet Tabs
 
Nope.

Just copy Chip's code into a general module inside that VBE window. At the
bottom of that web page, there's a link to a module that can be imported into
your workbook's project:

http://cpearson.com/Zips/modSortingWorksheets.zip

Then create another procedure that call's Chip's code:

Option Explicit
Sub testme()
If SortWorksheetsByName(0, 0, "", False) = False Then
MsgBox "something bad happened"
Else
MsgBox "ok--check the sheets"
End If
End Sub

janabanana wrote:

i copied and pasted it into visual basic. i substituted FirstToSort with
Sheet1.
am i on the right path?
i have 311 sheets. each sheet is a person's name.
help???
--
jana

"janabanana" wrote:

I visited the link below and see the function to sort by tab(sheet) name, but
I do not know where to type this function in. I don't know what all of the it
means, but I thought I would poke at it until I make it work for me.
--
jana


"JE McGimpsey" wrote:

See

http://cpearson.com/excel/sortws.htm

In article ,
"Jaqi" wrote:

How do I sort worksheets in a workbook based on tab text?


--

Dave Peterson


All times are GMT +1. The time now is 05:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com