I have a column (F) which I need to sort. I want to group all of the cells that do not have a interior.colorindex together. In other words like all cells colored in blue. Any help would be appreciated.
I have a column (F) which I need to sort. I want to group all of the cells that do not have a interior.colorindex together. In other words like all cells colored in blue. Any help would be appreciated.
Peace of mind is found in some of the strangest places.
Have a read of this, should answer your question http://www.cpearson.com/excel/SortByColor.htm
Also a great KB entry by XLD Here http://www.vbaexpress.com/kb/getarticle.php?kb_id=494
hmmm... I was going to suggest using a temporary column to write the colorindex to and sort by that
but there's probably a clever wayDim myRange As Range Dim tempRange As Range Dim c As Range Set myRange = Range("A1:I16") Set tempRange = Range("I1:I16") For Each c In tempRange c.Value = c.Offset(0, -3).Interior.ColorIndex Next myRange.Sort Key1:=Range("I1"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal For Each c In tempRange c.Value = "" Next
K :-)
I read that earlier but am unsure how to use the function. Perhaps someone can show me in an example.
Peace of mind is found in some of the strangest places.
here is a sample workbook
Peace of mind is found in some of the strangest places.
Can anyone explain the function in this procedure? Im baffled
http://www.cpearson.com/excel/SortByColor.htm
Peace of mind is found in some of the strangest places.
There's no better instructions than on that page. Anyone else who tries to describe it probably would not do any better.
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
I suppose that I did not express myself correctly. What does the function actually do and how do you get it to sort correctly? I cannot get it to sort at all.
Peace of mind is found in some of the strangest places.
The functions should return the interger value of the color index (Excel assigns colors an index value), this is what is returned. If you sort on this column, you can do so Ascendingly or descendingly.
I also like xld's KB entry. Byundt also gave an entry to use for Conditional Formatting color index's, because those are not the same as standard formats.
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables