Change colour of cell based on that cells number AND the colour of another cell

Woodpusher147

Board Regular
Joined
Oct 6, 2021
Messages
69
Office Version
  1. 365
Platform
  1. Windows
Hello
I have tried to solve this in another post without code but I cant get it to work properly so I try again.

My sheet needs to change the colour of a cell based on the colour of another cell AND the number contained within the cell I want to change.
e.g.
IF A2 is Amber AND A8 = 6 make A8 Green IF A8 =5 make A8 Yellow IF A8 = less than 5 make A8 Red If A8 = more than 6 make A8 Blue

Basically, there is an optimum(Green), >optimum (blue), minimum (yellow), < minimum (red)
These parameters would change depending on the colour of another cell, in the above case A2

The sheet pertains to staff rotas and the perfect amount of staff each day
Users will have the ability to set a colour in e.g A2, A9-A14 would show each staff members status (in - out -hols -sick etc) A8 counts the Ins and shows the number. Then the bit I need help with as above.

There are 4 situations (coloured days)
Black = 6 (no minimum)
Red = 4 (no minimum)
AMber = 3 minimum 4 Optimum
Green = 2 minimum 3 optimum
1659606690319.png



Thank you for any help
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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