Converting colored cells to numbers- is there a formula?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 

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

Back
Top