Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SORT COLOR CELLS INEXCEL
HI
PLS SHOW HOW TO SORT COLORS IN EXCEL IN DETAIL WAY |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SORT COLOR CELLS INEXCEL
Jilani,
Have a look at the sites below for a way to do it http://www.cpearson.com/excel/SortByColor.htm http://www.xldynamic.com/source/xld....r.html#sorting -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "JILANI" wrote in message ... HI PLS SHOW HOW TO SORT COLORS IN EXCEL IN DETAIL WAY |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SORT COLOR CELLS INEXCEL
For interest purposes, this is the code that I sent.
Sub DoPatternSort() Dim rRange As Range Dim lRowStart As Long, lRowEnd As Long, lRow As Long On Error GoTo ErrorEnd Application.ScreenUpdating = False Set rRange = Selection.CurrentRegion lRowStart = rRange.Row + 1 lRowEnd = rRange.Rows.Count rRange.Cells(1, 2).EntireColumn.Insert For lRow = lRowStart To lRowEnd Step 1 rRange.Cells(lRow, 2) = rRange.Cells(lRow, 1).Interior.ColorIndex Next lRow rRange.Sort Key1:=rRange.Cells(2, 2), Order1:=xlDescending, _ Key2:=rRange.Cells(2, 3), Order2:=xlAscending, _ Key3:=rRange.Cells(2, 1), Order3:=xlAscending, _ Header:=xlYes, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal, _ DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal rRange.Cells(1, 2).EntireColumn.Delete ErrorEnd: Application.ScreenUpdating = True End Sub -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "JILANI" wrote in message ... HI PLS SHOW HOW TO SORT COLORS IN EXCEL IN DETAIL WAY |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do u sort a cell (results or multiple cities) inexcel by name | Excel Discussion (Misc queries) | |||
sort cells by color ?Macro? | Excel Programming | |||
How do I sort or count cells by fill color? | Excel Discussion (Misc queries) | |||
Can I sort excel spreadsheet data by fill color of cells? | Excel Discussion (Misc queries) | |||
Can you sort excel data by color coded cells? | Excel Discussion (Misc queries) |