answersLogoWhite

0

You can either sort them manually by dragging them, or use some VBA code to do it automatically. To do that, hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window. Click Insert > Module, and then paste the following macro in the Module Window.

Sub SortWorkBook()

'Updateby20140624

Dim xResult As VbMsgBoxResult

xTitleId = "KutoolsforExcel"

xResult = MsgBox("Sort Sheets in Ascending Order?" & Chr(10) & "Clicking No will sort in Descending Order", vbYesNoCancel + vbQuestion + vbDefaultButton1, xTitleId)

For i = 1 To Application.Sheets.Count

For j = 1 To Application.Sheets.Count - 1

If xResult = vbYes Then

If UCase$(Application.Sheets(j).Name) > UCase$(Application.Sheets(j + 1).Name) Then

Sheets(j).Move after:=Sheets(j + 1)

End If

ElseIf xResult = vbNo Then

If UCase$(Application.Sheets(j).Name) < UCase$(Application.Sheets(j + 1).Name) Then

Application.Sheets(j).Move after:=Application.Sheets(j + 1)

End If

End If

Next

Next

End Sub

You can then close the VBA editor and return to your workbook. Pressing Alt + F8 will open the dialog box from where you can choose to run the macro. It will give you the option of sorthing them in ascending or descending order. The macro is stored in the workbook should you need to run it again.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

How many sheets tab appear when you open a work book?

3


Where can you get answers to your cheneliere math grade 8 work sheets?

At the back of the book.


What is worksheet?

called group or the number of sheets in ms excel is called work sheet . note:(it is also called work book)


How do you define a book?

A book is a written or printed work consisting of a set of sheets of paper bound together by a cover. A book may also be any substantial written work, whether printed and bound or available in digital form.


What is large book called?

A large book, especially one volume of a multi-volume scholarly work, is called a tome .


How many sheets are there in a work book by default?

Usually it is 3, but you can change the default in Options, which you'll find in the Tools menu.


How is the word 'book' defined?

A book is a written or printed work consisting of a set of sheets containing text and/or illustrations that are fastened to a cover. Books may contain fictional or non-fictional content.


Imagine you work for an engineering consulting firm What if your boss wants you to find the email he sent you more than a year ago regarding the Pascagoula refinery shutdown How would you begin lookin?

alphabetize your inbox and search under P for Pascogoula or S for shutdown


How do you alphabetize something in Excel so it ignores the word the?

I'm not sure you can (easily) short of writing a macro to do it. Have you considered writing, for example, 'The Thing' as 'Thing, The'? This should work.


How do you make a paper address book?

To make a paper address book, start by gathering materials such as blank sheets of paper, a binder or folder, and dividers if desired. Organize the sheets into sections for different categories like family, friends, and work contacts. You can create a template with columns for names, addresses, phone numbers, and email addresses. Finally, fill in the information as you gather it, and regularly update the book as needed.


How many sheets are in a 20-lb. ream?

work it out yourself.


How many work sheets in Microsoft Excel?

3