Help me sort my rows please!
September 11, 2007 2:26 PM
Subscribe
Is there a way to sort by "highlighted field" in Excel?
I have some rows I have highlighted in Excel. Some are highlighted green, some are highlighted yellow. I want to sort by highlight color, so all the greens are together, all the yellows are together, and all the non-highlighted rows are together.
Is this possible? If so, can you tell me how, because Excel Help was decidely unhelpful.
Thanks!
posted by BuddhaBelly to computers & internet (5 comments total)
4 users marked this as a favorite
Function GetColor(c1)
Application.Volatile
GetColor = c1.Interior.ColorIndex
End Function
(in VB editor, add a module to the VBAProject. Paste that function into it and save).
Then for example you can get the color value of cell A1 by putting =GetColor(A1) into another cell.
BTW- changing a cell's background color won't automatically update the value of =GetColor(A1), you have to push F9 after changing the background color.
posted by uberfunk at 2:41 PM on September 11, 2007