Conditional Formatting based on mode value in column

CallumJ999

New Member
Joined
Nov 21, 2016
Messages
15
Hello everyone,

As above I'm trying to apply conditional formatting which changes based on the mode value of a column in a table.
For example, in my column, I have various options, the 3 main being "In progress", "Build complete" and "Deployed"

I would like the Column header to be formatted so it's amber if the majority of the cells in the colum say "In progress", or be green if the majority say "Deployed"

Any ideas?
Thanks in advance!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
you could use a count of those values using countif

what about build complete ?

so 2 rules in conditional formatting rules

using a formula

=COUNTIF(A2:A8,"in progress")>(COUNTIF(A2:A8,"deployed")

format amber

=COUNTIF(A2:A8,"deployed")>COUNTIF(A2:A8,"in progress")

format green

what happens if deployed = in progress
 
Last edited:
Upvote 0
Idealy I would like Red if the majority is in progress, amber if majority is build complete and green if majority is deployed.

If they are equal at any point then round down to the lower status, where in progress is lowest/first, then build complete, and deployed is highest/last status
 
Last edited:
Upvote 0
You will need to define "majority".

Hmm, well whichever of the three occurs the most is the majority. However on second thought, one could occur more than the other two, but the other two combined might still be more meaning the first one isn't actually the majority. Hmm...

Maybe it would be better to have the target cell red if less than 50% of the cells in the column contain "Deployed", Amber if between 50-75%, Light Green from 75-99% and Dark Green for 100%. Could that be done?
 
Upvote 0
that % is calculated on deployed only

so
count of deployed / total count of all < 50 % Red
count of deployed / total count of all < 75 % light green
count of deployed / total count of all = 100 % green - so 100% means they ARE ALL deployed

is that what you mean ?
 
Upvote 0
that % is calculated on deployed only

so
count of deployed / total count of all < 50 % Red
count of deployed / total count of all < 75 % light green
count of deployed / total count of all = 100 % green - so 100% means they ARE ALL deployed

is that what you mean ?

Yes, but would rather have amber for 50- 75%, light green between 75-99%, and green for 100% only. Oh and red for under 50%
 
Upvote 0
ok
so assuming the column is G and starts at row 2 to 100 - adjust as required
=(COUNTIF($G$2:$G$100,"deployed")/counta($G$2:$G$100)
then in a conditional formatting
Make up rules and use a formula
put

=COUNTIF($G$2:$G$100,"deployed")/counta($G$2:$G$100)<0.5
Red

=COUNTIF($G$2:$G$100,"deployed")/counta($G$2:$G$100)<=0.75
format that rule as Amber

then
=COUNTIF($G$2:$G$100,"deployed")/counta($G$2:$G$100)<1
format that rule as light greeen

then the last rule
=COUNTIF($G$2:$G$100,"deployed")/counta($G$2:$G$100)=1
Green

But you need to put in this order and use STOP if TRUE

if you want to upload onto onedrive/dropbox a sample
 
Upvote 0
heres an example
column G
G2 to G100

ignore the blanks - we can sort that out - if this is exactly what you want
in cell I7 is the actual %

have a play
https://www.dropbox.com/s/qa4rb55m0eicf8f/cond_format_etaf.xlsx?dl=0


Thanks so much, that works perfectly. However, I overlooked something that's now become an obvious issue. I also have a cancelled option. Is there a way to keep all of the above formatting but to exclude cells that contain "Cancelled" from the percentage?
 
Upvote 0

Forum statistics

Threads
1,203,528
Messages
6,055,930
Members
444,835
Latest member
Jonaskr

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