Option Explicit
Sub test()
' hiker95, 10/29/2013
' http://www.mrexcel.com/forum/excel-questions/735788-run-macro-all-worksheets-except-one.html
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Data" Then
'***** the rest of your macro code goes here *****
End If
Next ws
End Sub
Option Explicit
Sub testV2()
' hiker95, 10/29/2013
' http://www.mrexcel.com/forum/excel-questions/735788-run-macro-all-worksheets-except-one.html
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Data" Then
With ws.UsedRange
.Value = .Value
End With
End If
Next ws
End Sub
Option Explicit
Sub testV2()
' hiker95, 10/29/2013
' http://www.mrexcel.com/forum/excel-questions/735788-run-macro-all-worksheets-except-one.html
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Data" Then
With ws.UsedRange
.Value = .Value
End With
End If
Next ws
End Sub
Sub Set_Scores()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "all_parameters" Then
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$AG$324"), , xlYes).Name = _
"Tabella1"
Range("Tabella1[#All]").Select
ActiveSheet.ListObjects("Tabella1").TableStyle = "TableStyleMedium2"
Range("Tabella1[[#Headers],[Rank Rating]]").Select
ws.ListObjects("Tabella1").Sort. _
SortFields.Clear
ws.ListObjects("Tabella1").Sort. _
SortFields.Add Key:=Range("Tabella1[[#All],[Rank Rating]]"), SortOn:= _
xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ws.ListObjects("Tabella1").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End If
End With
Next ws
End Sub
Sub Set_Scores_V2()
' hiker95, 04/14/2016, ME735788
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "all_parameters" Then
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$AG$324"), , xlYes).Name = "Tabella1"
Range("Tabella1[#All]").Select
ActiveSheet.ListObjects("Tabella1").TableStyle = "TableStyleMedium2"
Range("Tabella1[[#Headers],[Rank Rating]]").Select
ws.ListObjects("Tabella1").Sort.SortFields.Clear
ws.ListObjects("Tabella1").Sort.SortFields.Add Key:=Range("Tabella1[[#All],[Rank Rating]]"), SortOn:= _
xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ws.ListObjects("Tabella1").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End If
Next ws
End Sub
Ramiro,
Try:
Rich (BB code):Option Explicit Sub test() ' hiker95, 10/29/2013 ' http://www.mrexcel.com/forum/excel-questions/735788-run-macro-all-worksheets-except-one.html Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.Name <> "Data" Then '***** the rest of your macro code goes here ***** End If Next ws End Sub
Sub test()
' hiker95, 10/29/2013
' http://www.mrexcel.com/forum/excel-questions/735788-run-macro-all-worksheets-except-one.html
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Data" And ws.Name <> "Input" Then
'***** the rest of your macro code goes here *****
End If
Next ws
End Sub