Color Change

CHML

Board Regular
Joined
Mar 19, 2023
Messages
57
Office Version
  1. 2019
Platform
  1. Windows
  2. Web
Hi. I have records A1: L252. I want all cells in these rows to change color when column H changes. What is a simple way to do that?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi, Thanks. I know about Conditional formatting. But how do I proceed to change color in all cells when column H changes?
 
Upvote 0
Sorry for being short with my answer, but your question is rather vague.

If any cell in column H changes its value from Row 1 to Row 252, would you like for the color of all cells in range A1:L252 to change?

what color do they start with, and what color would you like them to change to?

also if a second cell from the H column changes after they have already changed color once, do you want them to change color again?
 
Upvote 0
See the attached sample I just made manually and wish this Excel should do for me for the entire sheet. I don't care which color as long you see a difference in each 'Teachers' name'

1710116437755.png
 
Upvote 0
Select row that you want to change color, select conditional formatting from the ribbon and click new rule, select "use formula to determine which cells to format" then use the following formula
=$H2="Teacher 1" then click the format button, click on fill, select a color from the options and click ok, then click ok again and then apply

do this reportedly until you have the number of teachers you require then press ok on the rules manager page

now click on format painter from the ribbon and select all other rows

hope this helps

Craig
 
Upvote 0
Thanks, Craig, but Excel could probably act quicker. I would instead do something around the following formula. =$H2<>H1 Still, the issue is that Conditional Formatting only offers one color at a time, which makes all corresponding cells the same color.
 
Upvote 0
Like Craig said you can have multiple conditions and make each teacher a different color using his answer
 
Upvote 0
I don't care which color as long you see a difference in each 'Teachers' name'
I'm assuming this is just to make it easier to see where a teacher group starts and finishes. If that is the case, would you be happy with a solution like this that just alternates two colours?
I'm also assuming no gaps in the data in col H.

Use a vacant column to the right (I used M) and enter this formula from row 2 down as far as you might ever need. You can then hide this column.
Apply the two very simple Conditional Formatting rules shown.
In fact, if you are happy with the banding being one colour and white you can omit the orange CF setting.

If you do want a unique colour for each teacher then you will either need a lot of CF rules or else apply the colour banding with vba rather than Conditional Formatting.

24 03 12.xlsm
ABCDEFGHIJKLM
1Teacher
2Teacher 11
3Teacher 11
4Teacher 11
5Teacher 11
6Teacher 11
7Teacher 11
8Teacher 11
9Teacher 20
10Teacher 31
11Teacher 31
12Teacher 31
13Teacher 31
14Teacher 31
15Teacher 40
16Teacher 40
17Teacher 40
18Teacher 51
19Teacher 51
20 
21 
22 
23 
24 
25 
CHML
Cell Formulas
RangeFormula
M2:M25M2=IF(H2="","",IF(H2=H1,M1,1-M1))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:L25Expression=$M2=0textNO
A2:L25Expression=$M2textNO
 
Upvote 0

Forum statistics

Threads
1,215,477
Messages
6,125,036
Members
449,205
Latest member
Eggy66

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