Hi everyone,
As I am still pretty new to this VBA-coding, I'm still strugling with simple pieces of codes.
My input on a given sheet is a matrix of different values on RGB-scale.
I would like to run a macro to colour the background of the cell according to its value (starting at A2). As I was unable to colour the background, I coloured the text instead.
As the matrix is larger than this, and contains other colour codes, I would like to adjust the cell values. This is a simplified version of my matrix
(Simple) input:[TABLE="width: 500"]
<tbody>[TR]
[TD]Blue[/TD]
[TD]Green[/TD]
[TD]Yellow[/TD]
[/TR]
[TR]
[TD]135, 195, 231
[/TD]
[TD]207, 223, 153[/TD]
[TD]254, 243, 157[/TD]
[/TR]
[TR]
[TD]0, 140, 208[/TD]
[TD]151, 191, 13[/TD]
[TD]255, 237, 0
[/TD]
[/TR]
[TR]
[TD]0, 56, 113[/TD]
[TD]103, 135, 19[/TD]
[TD]180, 164, 0[/TD]
[/TR]
</tbody>[/TABLE]
Desired output
[TABLE="width: 500"]
<tbody>[TR]
[TD]Blue[/TD]
[TD]Green[/TD]
[TD]Yellow[/TD]
[/TR]
[TR]
[TD]135, 195, 231
[/TD]
[TD]207, 223, 153[/TD]
[TD]254, 243, 157[/TD]
[/TR]
[TR]
[TD]0, 140, 208[/TD]
[TD]151, 191, 13[/TD]
[TD]255, 237, 0
[/TD]
[/TR]
[TR]
[TD]0, 56, 113[/TD]
[TD]103, 135, 19[/TD]
[TD]180, 164, 0[/TD]
[/TR]
</tbody>[/TABLE]
Thanks,
Floris
As I am still pretty new to this VBA-coding, I'm still strugling with simple pieces of codes.
My input on a given sheet is a matrix of different values on RGB-scale.
I would like to run a macro to colour the background of the cell according to its value (starting at A2). As I was unable to colour the background, I coloured the text instead.
As the matrix is larger than this, and contains other colour codes, I would like to adjust the cell values. This is a simplified version of my matrix
(Simple) input:[TABLE="width: 500"]
<tbody>[TR]
[TD]Blue[/TD]
[TD]Green[/TD]
[TD]Yellow[/TD]
[/TR]
[TR]
[TD]135, 195, 231
[/TD]
[TD]207, 223, 153[/TD]
[TD]254, 243, 157[/TD]
[/TR]
[TR]
[TD]0, 140, 208[/TD]
[TD]151, 191, 13[/TD]
[TD]255, 237, 0
[/TD]
[/TR]
[TR]
[TD]0, 56, 113[/TD]
[TD]103, 135, 19[/TD]
[TD]180, 164, 0[/TD]
[/TR]
</tbody>[/TABLE]
Desired output
[TABLE="width: 500"]
<tbody>[TR]
[TD]Blue[/TD]
[TD]Green[/TD]
[TD]Yellow[/TD]
[/TR]
[TR]
[TD]135, 195, 231
[/TD]
[TD]207, 223, 153[/TD]
[TD]254, 243, 157[/TD]
[/TR]
[TR]
[TD]0, 140, 208[/TD]
[TD]151, 191, 13[/TD]
[TD]255, 237, 0
[/TD]
[/TR]
[TR]
[TD]0, 56, 113[/TD]
[TD]103, 135, 19[/TD]
[TD]180, 164, 0[/TD]
[/TR]
</tbody>[/TABLE]
Thanks,
Floris