Hello
I would like to run this code on all worksheets. Currently, it works well on one sheet.
How do I change the code?
Many Thanks
I would like to run this code on all worksheets. Currently, it works well on one sheet.
How do I change the code?
Many Thanks
VBA Code:
Sub Sort_by_colour()
'
' Sort_by_colour Macro
'
'
Columns("A:A").Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add(Range("A1:A116"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(192, 0 _
, 0)
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A1:A116")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub