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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top