View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Converting colored cells to numbers- is there a formula?

Here is a 1 line function that will do the trick

Function GetColorIndex(myrange As Range) As Integer
'
'
GetColorIndex = myrange.Interior.ColorIndex

End Function

Call it from the excel spreadsheet with

=GetColorIndex(A25) or any cell you want.

"Math Geek" wrote:

I'm importing a report that generates colored cells that represent different
values. I need to change those colored squares to numbers to work with the
values.

Is there such a formula?