Conditional formatting help

Grictori

New Member
Joined
Mar 6, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I am trying to add in conditional formatting to a tracker spreadsheet to enter 1 of 4 options from a list based on greater than / less than scenario. Basically, data validation type options, but automated based on days ahead/behind. For example, I have a table/legend that has "late", "at risk", "on schedule", and "ahead of schedule". The criteria is <0, 1-5, 6-10, 10+ respectfully. I also want Red, Orange, light green, and dark green. I have a column on my sheet that calculates how many days from or past the due date as a reference. Can this easily be done?

Thanks for the help
 

Attachments

  • table.JPG
    table.JPG
    80.1 KB · Views: 7

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Welcome to the MrExcel board!

I'm a little unsure where some of the category boundaries are (eg whether 10 is in 6-10 or 10+) but could you use formulas like this in the Status column and the conditional formatting as shown?
(I can't tell from the image which columns/rows that data is in so you'll have to adjust)

23 03 07.xlsm
IJ
1StatusDays
2On Schedule6
3Ahead of Schedule25
4 
5Late-2
6At Risk3
Crictori
Cell Formulas
RangeFormula
I2:I6I2=IF(J2="","",LOOKUP(J2,{-999,1,6,10},{"Late","At Risk","On Schedule","Ahead of Schedule"}))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I2:I6Expression=LEFT(I2,2)="Ah"textNO
I2:I6Expression=LEFT(I2,2)="At"textNO
I2:I6Expression=LEFT(I2,2)="La"textNO
I2:I6Expression=LEFT(I2,2)="On"textNO
 
Upvote 0
Use formula to set your conditional formats. Below is an example. The top rule is just saying if the cell is blank make the color no fill. Keep this at the top to avoid coloring your blanks red.
 

Attachments

  • Screenshot 2023-03-06 201532.png
    Screenshot 2023-03-06 201532.png
    32 KB · Views: 9
Upvote 0
Ok thanks for the first two responses, but my inexperience is causing me some confusion. I tried your suggestions, but I am doing something wrong. I attached a better image to show what I am trying to accomplish. I hope that clarifies things more. Sorry my work computer will not let me install the add on so I cannot attach the mini-sheet.
 

Attachments

  • excel help.JPG
    excel help.JPG
    243.9 KB · Views: 5
Upvote 0
Welcome to the MrExcel board!

I'm a little unsure where some of the category boundaries are (eg whether 10 is in 6-10 or 10+) but could you use formulas like this in the Status column and the conditional formatting as shown?
(I can't tell from the image which columns/rows that data is in so you'll have to adjust)

23 03 07.xlsm
IJ
1StatusDays
2On Schedule6
3Ahead of Schedule25
4 
5Late-2
6At Risk3
Crictori
Cell Formulas
RangeFormula
I2:I6I2=IF(J2="","",LOOKUP(J2,{-999,1,6,10},{"Late","At Risk","On Schedule","Ahead of Schedule"}))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I2:I6Expression=LEFT(I2,2)="Ah"textNO
I2:I6Expression=LEFT(I2,2)="At"textNO
I2:I6Expression=LEFT(I2,2)="La"textNO
I2:I6Expression=LEFT(I2,2)="On"textNO
Peter, I am sorry that I am still confused and I appreciate your attempt at helping me. Please see my post below and hopefully it clarifies things more. I am not sure how to make your suggestions work.
 
Upvote 0
Ok thanks for the first two responses, but my inexperience is causing me some confusion. I tried your suggestions, but I am doing something wrong. I attached a better image to show what I am trying to accomplish. I hope that clarifies things more. Sorry my work computer will not let me install the add on so I cannot attach the mini-sheet.
I think I figured it all out. I am now just working on "done" and greying out the entire row if it shows as complete.
 
Upvote 0
I tried your suggestions, but I am doing something wrong. I attached a better image to show what I am trying to accomplish.
I think that my previous suggestion does exactly what you want except that .
  1. It was pointed at the wrong columns because we didn't know what they were until post 4, and
  2. A new condition/colour has now been introduced.
I think this variation should do what you want. There may be a simpler formula for the status values in column L depending on your new formula in column M. (I am assuming that the formula in column M will change and provide some sort of different result if column I has a date?)

23 03 07.xlsm
IJKLM
1Completed DateStatusDays
2On Schedule6
3Ahead of Schedule25
4 
5Late-2
6At Risk3
7 
87/03/2023Complete??
Grictori
Cell Formulas
RangeFormula
L2:L8L2=IF(I2="",IF(M2="","",LOOKUP(M2,{-999,1,6,10},{"Late","At Risk","On Schedule","Ahead of Schedule"})),"Complete")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
L2:L10Expression=LEFT(L2,2)="Co"textNO
L2:L10Expression=LEFT(L2,2)="Ah"textNO
L2:L10Expression=LEFT(L2,2)="At"textNO
L2:L10Expression=LEFT(L2,2)="La"textNO
L2:L10Expression=LEFT(L2,2)="On"textNO
 
Upvote 1
Solution
Ok last question and I appreciate all the help. I have everything working thanks to the help except the "complete" function.
Let's say the task is ahead of schedule and I enter a complete date in the "I" column, I want the status to automatically change to "complete".
Right now that status column (Column I) function is only prompted by due date/current date formula.
I believe the formula in the status column conditional formatting is something like =IF($I2>0 but I do not know what the rest should look like. I am also assuming I move this formula up on the priority for conditional formatting?
 

Attachments

  • excel help.JPG
    excel help.JPG
    64.1 KB · Views: 6
Upvote 0
Let's say the task is ahead of schedule and I enter a complete date in the "I" column, I want the status to automatically change to "complete".
Right now that status column (Column I) function is only prompted by due date/current date formula.
Sounds like you didn't try my last suggestion. It addresses both of those points. Put this formula in L2 (in the cell itself, not in the conditional formatting)

1678406013280.png


I believe the formula in the status column conditional formatting is something like =IF($I2>0 but I do not know what the rest should look like.
Again, it sounds like you didn't try my last suggestion using these conditional formatting rules. The highlighted one is for the "complete" entries.

1678406236207.png
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,215
Members
452,618
Latest member
Tam84

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