Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 336
Default sort column by colour

Hello, I have been given a rather large database sheet in Excel and some of
the line records have been coloured red, green and standard black. Is there a
way I can sort the records by colour i.e. red first the green then black?

Any tips or ideas most welcome Thanks Martin

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 695
Default sort column by colour

if column right to colored cells is free:
select column where ur colored cells are - run sub

Sub farve()
c = ActiveCell.Column
For r = 1 To 100
Cells(r, c + 1) = Cells(r, c).Interior.ColorIndex
Next

then sort sub after created numbers

"Martin" skrev:

Hello, I have been given a rather large database sheet in Excel and some of
the line records have been coloured red, green and standard black. Is there a
way I can sort the records by colour i.e. red first the green then black?

Any tips or ideas most welcome Thanks Martin

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 695
Default sort column by colour

if u mean the text color use this

Cells(r, c + 1) = Cells(r, c).Font.ColorIndex

"Martin" skrev:

Hello, I have been given a rather large database sheet in Excel and some of
the line records have been coloured red, green and standard black. Is there a
way I can sort the records by colour i.e. red first the green then black?

Any tips or ideas most welcome Thanks Martin

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default sort column by colour

Martin

Excel cannot do this without help.

See Chip Pearson's site for code.

http://www.cpearson.com/excel/SortByColor.htm

Or Bob Phillips' site

http://www.xldynamic.com/source/xld.ColourCounter.html


Gord Dibben MS Excel MVP


On Fri, 21 Jul 2006 03:20:01 -0700, Martin
wrote:

Hello, I have been given a rather large database sheet in Excel and some of
the line records have been coloured red, green and standard black. Is there a
way I can sort the records by colour i.e. red first the green then black?

Any tips or ideas most welcome Thanks Martin


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 I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
How do I format a column in alpha order? Marian New Users to Excel 3 April 2nd 06 05:15 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 2 November 27th 04 01:55 AM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 0 November 26th 04 03:19 PM


All times are GMT +1. The time now is 12:46 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"