Compare cell colour to other cell colour and trigger action automatically

Maxime_Excel

New Member
Joined
Jul 9, 2024
Messages
4
Office Version
  1. 2021
Platform
  1. Windows
Hi,

I have a worksheet with a few columns and rows.

INPUT TABLE

Group nameWk 1Wk 2Wk 3Wk 4
Group 1redred
Group 2yellowyellow
Group 3redpurple

Every week we review the performance of the different groups and colour the inside of the cell in certain colour, manually: green, orange, red, purple, ... (they all have their own meaning). In the table above, I wrote "red" but the cell is actually coloured in red, AND there is a number inside the cell, so I cannot write "red" inside either.

OVERVIEW TABLE

In another table, we want to highlight in which week a significant change occured. A significant change = a colour change. So if this week is Wk2 then group 3 has a colour change and we want to show that with the colour black.
The Overview table would look like:

Group nameWk 1Wk 2Wk 3Wk 4
Group 1whitewhite
Group 2whitewhite
Group 3whiteblack


I know about the GET.CELL formula. It would be easy to use this formula, however the GET.CELL formula doesn't trigger an event based on a colour change. For an event to happen, I need to enter the formula again - which is not what we are aiming for.

Is there a different way to compare a cell colour with another cell colour and launch a formula based on a IF, THEN, ELSE? Keep in mind that the cell colours will change, it's not a one time event (then GET.CELL would have been perfect).

Thanks!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
There is no way a formula can see the colour/format of another cell. Let alone trigger if the cell colour changes.
Even VBA cannot detect the change of cell colour.
 
Upvote 0
There is no way a formula can see the colour/format of another cell. Let alone trigger if the cell colour changes.
Even VBA cannot detect the change of cell colour.
I was not ware of that. I guess I will always have to click "recalculate", which is fine. GET.CELL doesn't react to "recalculate" though, so that is still not an option.

Regarding the actual formula: how can I compare the colour of one cell with the colour of another?
 
Upvote 0
You cant. As I said a formula cannot see the colour/format of other cells.
 
Upvote 0
You cant. As I said a formula cannot see the colour/format of other cells.
I understood that VBA cannot trigger an action based on a colour change, but I thought VBA can read the colour of a cell?
 
Upvote 0
I understood that VBA cannot trigger an action based on a colour change, but I thought VBA can read the colour of a cell?

You can compare cell colors based on results of GET.CELL as color will be represented by a number. As for recalculation you can help it with something +NOW()-NOW().
 
Upvote 0
You can compare cell colors based on results of GET.CELL as color will be represented by a number. As for recalculation you can help it with something +NOW()-NOW().
Do you mind explaining what you mean?

I know how to get the number from the colours, I have them visible, but how can I automatically re-calculate the comparison between old number and new number when a colour gets updated?
Let's say the following:

1ABC
2Group nameWk 1Wk 2Wk 3Wk 4
3Group 133
4Group 266
5Group 3329


Overview table

1ABC
2Group nameWk 1Wk 2
3Group 1whiteWHAT SHOULD THIS FORMULA BE?
4Group 2whiteWHAT SHOULD THIS FORMULA BE?
5Group 3whiteWHAT SHOULD THIS FORMULA BE?

Imagine that we just added the colours of Wk 2 in the first table. How will the Overview table update automatically?
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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