Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Sort rows by color

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 27 Jun 2007 12:58 GMT
Is there a way in office 2000 to sort rows by color?  I'm not good with code
and cutting and pasting over 1000 rows is becoming tiresome.

Thanks
Bernie Deitrick - 27 Jun 2007 14:25 GMT
Text color or background color?

Use a UDF - copy and paste this into a codemodule:

Function BGColor(myR As Range) As Integer
BGColor = myR.Interior.ColorIndex
End Function
Function FColor(myR As Range) As Integer
FColor = myR.Font.ColorIndex
End Function

Then use them like so

=BGColor(A2)
=FColor(A2)

depending on whether you want BackGroundColor  or FontColor.

Copy the formula down to match your cells, then sort based on that column.

HTH,
Bernie
MS Excel MVP

> Is there a way in office 2000 to sort rows by color?  I'm not good with code
> and cutting and pasting over 1000 rows is becoming tiresome.
>
> Thanks
Chip Pearson - 27 Jun 2007 15:07 GMT
Chris,

Excel 2007 added this capability. For earlier versions, see
http://www.cpearson.com/excel/SortByColor.htm for example code to do this.

Signature

Cordially,
Chip Pearson
Microsoft MVP  - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

> Is there a way in office 2000 to sort rows by color?  I'm not good with
> code
> and cutting and pasting over 1000 rows is becoming tiresome.
>
> Thanks

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.