sort column by colour

G

Guest

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
 
G

Guest

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:
 
G

Guest

if u mean the text color use this

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

"Martin" skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top