Sub sort_bycolours()
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(255, _
255, 0)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(146, _
208, 80)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(112, 48 _
, 160)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(31, 73 _
, 125)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(204, _
153, 0)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(192, 0 _
, 0)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(148, _
138, 84)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(218, _
150, 148)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(141, _
180, 226)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(38, 38 _
, 38)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(217, _
217, 217)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(252, _
213, 180)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add(Range("B16:B55"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(128, _
128, 128)
ActiveWorkbook.Worksheets("STATEMENT").Sort.SortFields.Add2 Key:=Range( _
"B16:B55"), SortOn:=xlSortOnCellColor, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("STATEMENT").Sort
.SetRange Range("STMTRNG")'("B14").CurrentRegion
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Bookmarks