Sort Range by Font Color

R

RyanH

I am looking for an easy way to sort a range by font color. The range is
made up of 14 columns and I want to sort by Col. 12. Col. 12 has empty
cells, cells with font color index = 15 and cells with font color index =
xlAutomatic. I want to delete all the rows that don't have a font color
index = xlAutomatic in Col. 12. I currently have a loop that does this, but
it takes a long time.

I figure if I can sort all font color index = xlAutomatic to the top I can
quickly delete everything underneath very easily. Is there a way to sort by
font color? I know you can do it in 2007, but what about 2003?
 
J

Joel

Deleting always takes a long time when you delete one row at a time. To
speed the code, put an X in the rowss you want deleted in an auxilary column.
Then sort the worksheet using the auxilary column as the key in Descending
order. Then delete the rows with an X. You'll probably get 100 times
improvement in execution speed.
 

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