Need help with conditional formatting

squirrel442

New Member
Joined
Feb 20, 2024
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
Below is the screenshot of my spreadsheet:-
crop.jpg



I’m currently on the tab Oct23, this is the start data.
Next tabs is Nov23, Dec23 and so on.
What I’m wanting to do is add the new data to Nov23 tab and have the cell colour change based on the number difference to Oct23.

What I’m looking for is:-
Red cell if -2 & below
Light red if -1
No change if the same
Dark green if +1
Light green if +2 & above

The full spread sheet is:-
Coloumns = A to AQ
Rows = 2 to 99

How do I do this?
I know its conditional formatting, but how do I set this up?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
A quick note on conditional formatting, get one cell working first and then apply the formatting across the whole range.

To me, the easiest way is to create 4 individual formatting rules. Start by selecting cell C2. Then when you start a new rule, select "Use a formula to determine which cells to format" option. For the formula, you want to write:
=(C2-October!C2)=2
If you select cells, it will likely put a $C$2 and you need to remove the $. You can either manually remove them or put the cursor in the $C$2 and then press F4 until they disappear (3 times I think). If this sounds odd, just try it and see what happens.

Next, set your format so it shades the proper color.

Click "OK" and you should see the "Conditional Formatting Rules Manager". Under "Applies to" it should say =$C$2. You need to change this to the range you would like to apply it across. Based on what you said, you would want this to read =$C$2:$AQ$99. I assumed you don't want this to apply to the Name or Position columns. (In the picture below, I left the -2 case showing the initial state, but I change the others to cover my whole range.) Be patient with this step. If you type the range in manually, sometimes it will automatically populate a range in addition to what you are typing. Just delete the extra parts.

Now you need to "Duplicate Rule" three times. Then just change each case as needed to the test value you are comparing against and the formatting you want to see.

Hope this helps! (Note, if you copy and paste the formatting across from November to another month, you will need to update the "October" in each equation so you are comparing to the correct month.)

1708439793948.png
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
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