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