My tests are going very well: I have been able to run successfully the Excel Macro:
Sub Colourise() ' ' Colourise Macro ' ' Colours all selected cells, based on their current integer rgb value ' For e.g. (it's a bit backward from what you might expect) ' 255 = #ff0000 = red ' 256*255 = #00ff00 = green ' 256*256*255 #0000ff = blue ' 255 + 256*256*255 #ff00ff = magenta ' and so on... ' ' Keyboard Shortcut: Ctrl+Shift+C (or whatever you want to set it to) ' For Each cell In Selection If WorksheetFunction.IsNumber(cell) Then cell.Interior.Color = cell.Value End If Next cell End Sub
BUT one has to be very cautious with the input data as (at least with my version) Excel processes the colour value as "BGR" as explained in the code, and not "RGB" as I was expecting!
The Cell content has to be: (Blue*256+Green)*256+Red to get the right colour!!!