Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SORT COLOR CELLS INEXCEL

HI

PLS SHOW HOW TO SORT COLORS IN EXCEL IN DETAIL WAY


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do u sort a cell (results or multiple cities) inexcel by name Cetee Excel Discussion (Misc queries) 1 May 22nd 09 09:20 AM
sort cells by color ?Macro? JVLennox Excel Programming 8 March 18th 06 04:15 AM
How do I sort or count cells by fill color? Rob Excel Discussion (Misc queries) 2 December 23rd 05 09:37 PM
Can I sort excel spreadsheet data by fill color of cells? Fashionheadhunter Excel Discussion (Misc queries) 2 September 7th 05 01:35 AM
Can you sort excel data by color coded cells? lbs Excel Discussion (Misc queries) 2 August 3rd 05 03:00 PM


All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"