![]() |
Is there a way to sort by color in excel? using macros?
I'd like to sorty information I have in excel, that I've color coded. Is
there anyway to sort this list of #'s by color ? I heard that you can create a macro to do this, but I don't know how to do it. |
Check out Chip Pearson's site:
http://www.cpearson.com/excel/SortByColor.htm tj "PJ456" wrote: I'd like to sorty information I have in excel, that I've color coded. Is there anyway to sort this list of #'s by color ? I heard that you can create a macro to do this, but I don't know how to do it. |
hi,
the technique involves assigning a number to a helper column at the end of the data then sorting by the helper column. example sub setcolor() dim c as range dim c2 as range set c = range("A1") do while not is empty(c) set c2 = c.offset(1,0) if c.interia.colorindex = 5 then c.offset(0,10).value = 1 else if c.interia.colorindex = 20 then c.offset(0,10).value = 2 end if end if set c = c2 loop regards Frank -----Original Message----- I'd like to sorty information I have in excel, that I've color coded. Is there anyway to sort this list of #'s by color ? I heard that you can create a macro to do this, but I don't know how to do it. . |
All times are GMT +1. The time now is 01:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com