Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub SortByInteriorColor()
With ActiveSheet.UsedRange
For Each s In Range(Cells(.Row, 1), Cells(.Row + .Rows.Count - 1, 1))
With s
Cells(.Row, "B").Value = .Interior.ColorIndex
End With
Next
End With
With ActiveSheet.UsedRange
.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlNo _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With
End Sub
Function WhatInteriorColor(rng)
WhatInteriorColor = rng.Interior.ColorIndex
End Function
Function WhatFontColor(rng)
WhatFontColor = rng.Font.ColorIndex
End Function