Conditional Formatting Formula

Falko26

Board Regular
Joined
Oct 13, 2021
Messages
99
Office Version
  1. 365
Platform
  1. Windows
Hey Team,

I am looking to do some conditional formatting on a Gantt chart for Prerequisites. I am using the styles "Good Bad and Neutral" from the styles tab.

Columns D E F G are manually assigned a number. I want the formatting to look at the number assigned to the cell, find the row associated with that number from column "B", and Check Column "I" for the the % Complete. If the percent is Less than 90% I want the formatting to show up "Bad". If its between 90% and 99% I want it to show up Neutral. If its 100% complete then I want it to be "Good". I also am looking to get this applied to the entirety of columns D E F G so it will still work if rows are added. So we might need something that states if cell value does not have a number than do nothing with formatting? is that possible?

1721053171752.png


Thanks for the assistance.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Maybe something like this:

Select the entire column range D:G and apply the formulas. You'll have to change the lookup ranges though to handle adding rows.
Book1
BCDEFGHI
91234510%
102620%
1137830%
1249101140%
135121350%
1461460%
1571570%
16880%
17990%
181090%
191190%
20120%
21130%
2214100%
2315100%
24160%
25170%
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D:GExpression=XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)=1textNO
D:GExpression=AND(XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)>0.89,XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)<1)textNO
D:GExpression=AND(XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)>0,XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)<0.9)textNO
 
Upvote 0
Solution
Thanks so Much!

This is 99% what I'm looking for.

Is there any way to also color prerequisites red if the percentage = 0? Without causing the rest of the cells in the columns turning red since 0 also applies to blank cells. I tried changing it to >= Greater than or equal to and this obviously happened.

1721059133846.png


Thanks,
 
Upvote 0
Yes, see the new rule here:
Book1
BCDEFGHI
91234510%
102620%
1137830%
1249101140%
135121350%
1461460%
1571570%
16880%
17990%
181090%
191190%
20120%
21130%
2214100%
2315100%
24160%
25170%
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D:GExpression=AND(XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)=0,XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)<>"")textNO
D:GExpression=XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)=1textNO
D:GExpression=AND(XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)>0.89,XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)<1)textNO
D:GExpression=AND(XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)>0,XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)<0.9)textNO


Excel Formula:
=AND(XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)=0,XLOOKUP(D1,$B$9:$B$25,$I$9:$I$25,"",0)<>"")
 
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,453
Members
452,514
Latest member
cjkelly15

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