ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel 2003 - How do I reverse the order of sheet tabs in one step? (https://www.excelbanter.com/excel-discussion-misc-queries/190705-excel-2003-how-do-i-reverse-order-sheet-tabs-one-step.html)

Lisa at VELUX America Inc.

Excel 2003 - How do I reverse the order of sheet tabs in one step?
 
In a Excel 3 workbook, I have 12 worksheets and need to reverse the order of
the worksheets (tabs). Rather than having to drag each tab to it's new
location, is there not a way to do this in one step - similar to the
Transpose feature in Paste Special?

Jim Cone[_2_]

Excel 2003 - How do I reverse the order of sheet tabs in one step?
 

That will require a macro.
Also, most code you might find (in a newsgroup search) would
most likely place the sheets in ascending or descending
order, not simply reverse an existing order...
'--
Sub BackToTheFuture()
Dim AllShts As Sheets
Dim N As Long
Dim C As Long
Set AllShts = ActiveWorkbook.Sheets
C = AllShts.Count
For N = 1 To (C - 1)
AllShts(C).Move Befo=AllShts(N)
Next
AllShts(1).Select
Set AllShts = Nothing
End Sub
'--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins - free trial of XL Extras - no registration)
-sort sheets in true numerical order-



"Lisa at VELUX America Inc."
wrote in message
In a Excel 3 workbook, I have 12 worksheets and need to reverse the order of
the worksheets (tabs). Rather than having to drag each tab to it's new
location, is there not a way to do this in one step - similar to the
Transpose feature in Paste Special?


All times are GMT +1. The time now is 04:05 PM.

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