ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sorting by color? (https://www.excelbanter.com/excel-worksheet-functions/6317-sorting-color.html)

Dave@Penske

Sorting by color?
 
Is there a way to sort your worksheet data by the color of the individual
cells?

tjtjjtjt

There's no built-in way, but you might want to chek this out:

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

tj

"Dave@Penske" wrote:

Is there a way to sort your worksheet data by the color of the individual
cells?


Frank Kabel

Hi
see:
http://www.cpearson.com/excel/SortByColor.htm
and
http://www.xldynamic.com/source/xld.ColourCounter.html

you'll need vBA for this

--
Regards
Frank Kabel
Frankfurt, Germany

"Dave@Penske" schrieb im
Newsbeitrag ...
Is there a way to sort your worksheet data by the color of the

individual
cells?



Scott

Here's a solution to sort by any type of format.

1. In visual basic, paste in this code.

Function CellFormat(cell_to_test As Range) As String
CellFormat = cell_to_test.Font.Color & " " & cell_to_test.Interior.Color
& " " & cell_to_test.Font.Size & " " & cell_to_test.Font.FontStyle
End Function

2. Insert a column into your spreadsheet called something to the effect of
"Cellformat."
3. =cellformat(H7) is now the function to identify your formatting based on
your macro definition in step 1.
4. The output of your new funtion will be: 0 10092543 10 Regular, 0 16777164
10 Regular,16711680 16777215 10 Bold
5. You can now sort on this CellFormat column.





All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com