Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel - sort by color

Status
Not open for further replies.

steveave

Technical User
Jun 4, 2001
60
US
Is there a way to sort cells by the color of the cell or the color of the text/number within the cells?
 
The following code will read the text color from column B and write the color value to column A.

Sub ColorCodes()
For IntR = 1 To 1000
ActiveSheet.Rows(IntR).Columns(1) = ActiveSheet.Rows(IntR).Columns(2).Font.ColorIndex
Next IntR
End Sub

You can then sort your data by using column A.
Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top