Sorting Text by color

B

Brooks W.

Is there a way to sot based on the color of the text or by the background
color?

I have a spreadsheet that the background is changed based on the status of a
shipment and we would like to be able to sort by the color.
 
G

Gary''s Student

Enter this small UDF:

Function clr(R As Range) As Integer
With R.Interior
clr = .ColorIndex
End With
End Function


If you data-by-background-color is in column A then enter:
=clr(A1)

in an un-used column and copy down. Then sort by the new column.
 
Top