Conditional formatting based on the table value

amircse0711

New Member
Joined
Jul 22, 2019
Messages
25
Can i have a table of conditional formatting color buttons that change as the color of the cell of other table changes

Example : I have two tables (1). shift table and (2) status table

1. Shift table is the monday-friday table with 3 shifts of 8 hours each and each shift is divided into 4 cells of 2 hours each
2. status table is the monday to friday table with 3 shifts .
(Please see the snapshot for clear idea - https://imgur.com/yrH6mXG )

Now if the status of the shift table (8 hours ) is green in monday morning shift, then the status table should give green button.

If the status of the shift table is red /closed for monday night shift, then it should be reflected in the status table.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Not sure what a "table of conditional formatting color buttons" is.
I don't know of a way to use conditional formatting to change the color of a button directly. You should be able to get a similar effect by using a worksheet change event on the cell that contains a value that determines the color of a table (If this cell is over 50 hours then red) to change the CommandButton.backcolor=rgbred

Put the following on the worksheet code page

Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Range("R17"), Target) Is Nothing Then
        Select Case Target.Value
        Case Is > 50: CommandButton1.BackColor = rgbRed
        Case Is > 40: CommandButton1.BackColor = rgbOrange
        Case Is > 0: CommandButton1.BackColor = rgbGreen
        End Select
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,580
Members
448,972
Latest member
Shantanu2024

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