Please help with Colour and Cell Value :0)

will2soar

New Member
Joined
Dec 2, 2017
Messages
3
Hello,

The enter key got away from me in the last post.

I need help with this problem

[TABLE="width: 300"]
<tbody>[TR]
[TD][/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]8[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]3[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD]12[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]4[/TD]
[TD]8[/TD]
[TD]12[/TD]
[TD]16[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]5[/TD]
[TD]10[/TD]
[TD]15[/TD]
[TD]20[/TD]
[TD]25[/TD]
[/TR]
</tbody>[/TABLE]

MY table is something like this and the background or cell fill matches the colour of the numbers. there are five different colours.


[TABLE="width: 500"]
<tbody>[TR]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]


What I'd like the sheet to do is, match the third column value and background fill to the same background fill colour and value as in the table.

Can anyone please help me sort this one out.

TY

B
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
If the colors in the key don't change, you can setup individual conditional formatting for value ranges. If it's going to be variable, I think the only solution would be through VBA. As an example:
Code:
Sub MultColor()
    Dim x As Range
    
    Set x = Sheets("ColorKey").Range("B2:F6").Find(What:=Range("C21").Value, After:=Cells(2, 2), _
        LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=True)
    
    Range("C21").Interior.Color = x.Interior.Color
    Range("C21").Font.Color = x.Font.Color
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top