Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I am trying to create an index of the sheets in my Excel file. I'm using David McRitchie's code to create the index and all is working as it should. What I would like to do is skip the first two sheets in the workbook when indexing. How can I modify the below code to skip the first two sheets? Thanks! Melinda Sub SheetNamesSortedDownRows() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Dim Rng As Range Dim WS As Worksheet Set Rng = Range("c14") For Each WS In ActiveWorkbook.Worksheets Rng.Value = "'" & WS.Name Set Rng = Rng(2, 1) Next WS Cells.Sort Key1:=Range("c14"), Order1:=xlAscending, _ Header:=xlNo, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom Range("c14").Select Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Indexing Sheets in Referenced Workbook within formula | Excel Worksheet Functions | |||
Skip Rows in Fill Series and Filter to Two different sheets | Excel Worksheet Functions | |||
skip hidden sheets | Excel Programming | |||
Sheets Skip Macro | Excel Discussion (Misc queries) | |||
skip empty sheets | Excel Programming |