Thread: [Solved] Counting Colors
View Single Post
 
Old 03-13-2011, 06:54 AM
g48dd g48dd is offline Windows XP Office 2003
Novice
 
Join Date: Jan 2011
Location: Iraq
Posts: 12
g48dd is on a distinguished road
Default Counting Colors

Using Excel 2003: This function will extract the index number of a cell that has color:
Code:
Function getcolor(cell)
getcolor = cell.Interior.ColorIndex
End Function
. It returns a number eg. A1 is yellow. In B1 I insert this function. and point the function to A1. It returns the number 6, becuse 6 is the index number for yellow. You can then sort that column and all of your rows will be sorted by color. However this does not work if the background color is the result of CONDITIONAL FORMATTING. I was wondering if there is someone who would know how to sort by color if the colors are the result of conditional formatting?

Thank you
Ken
Reply With Quote