Public Sub DeleteUnused() Dim ws As Worksheet, i As Integer i = 25 For i = 25 To 1 Step -1 If Worksheets(i).Name = Worksheets(" & i & ") Then Worksheets(" & i & ").Delete End If Next i End Sub
|MS Excel: Possible to sort and remove duplicates from data, and list in a different column automatically?||4||35|
|How to search column a for a list of 30 different possible strings and return the string name in column b||9||16|
|Delete all charts except for two charts with a specific name using VBA||8||13|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
23 Experts available now in Live!