ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Converting colored cells to numbers- is there a formula? (https://www.excelbanter.com/excel-worksheet-functions/132150-converting-colored-cells-numbers-there-formula.html)

Math Geek[_2_]

Converting colored cells to numbers- is there a formula?
 
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?

joel

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?



All times are GMT +1. The time now is 06:50 AM.

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