+ Reply to Thread
Results 1 to 12 of 12

Conditional Formatting Formula By Using Colors In the Cells

  1. #1
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Conditional Formatting Formula By Using Colors In the Cells

    As discussed, I have listed and numbered the business rules, it is worth creating this in a sequenced query from 1 to 10. Please note the & conditions in rules 4 and 9:

    1. If any HIGH CRITICAL station is RED, then group = RED.
    2. If greater than or equal to 50% of the HIGH CRITICAL stations are AMBER (and no less than 2) then Group = RED
    3. If greater than or equal to 70% of MEDIUM CRITICAL stations are RED 9 (and no less than 3) then Group = RED
    4. If less than 50% of HIGH CRITICAL stations are AMBER & greater than or equal to 70% of MEDIUM CRITICAL stations are AMBER then Group = RED
    5. If any HIGH CRITICAL station is AMBER, then Group = AMBER
    6. If any MEDIUM CRITICAL station is RED, then Group = AMBER
    7. If greater than or equal to 50% of MEDIUM CRITICAL stations are AMBER (and no less than 3), then Group = AMBER
    8. If greater than or equal to 70% of LOW CRITICAL stations are RED (and no less than 2), then Group = AMBER
    9. If less than 50% of MEDIUM CRITICAL stations are AMBER & greater than or equal to 70% of LOW CRITICAL stations are AMBER then Group = AMBER
    10. All other conditions that do not fit into the above scenarios, the Group = GREEN

    Thanks for your help.

    Regards,
    shameen
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,843

    Re: Conditional Formatting Formula By Using Colors In the Cells

    This proposed solution uses nine formulas which will return either TRUE or FALSE for the first nine scenario's. It does seem like scenarios 3 and 4 could be combined because it is possible, in #4, that there could be 0% of high critical stations are amber and 70% or more of medium critical stations are red, which would be basically the same as scenario #3 with the exception of the minimum requirement, therefore dropping the minimum requirement from #3 seems to cover number 4. It also seems that #9 could trigger an amber group rating at a lower threshold than #8. That said I went ahead and wrote formulas to cover the scenarios as they are presented in the first post. In the attached file column H lists the scenarios and column G displays the results of the formulas so that it is easy to see which scenario(s) lead(s) to the group condition displayed in C10. The following three formulas are used as conditional formatting rules for filling cell C10 Green, Amber and Red respectively:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting Formula By Using Colors In the Cells

    Hello JeteMc, Thank you very much for your kind reply. The result required in one cell (Resul???) for the criticality and integrity status of each line items. For eg. If any critical stations are red and the result will be red which will return on the result field and the rest of the scenarios will be ignored. Similarly, on the second scenario, if greater than or equal to 50% of the high critical stations are amber then it should return the red on the result cell and the rest of the scenarios will be ignored. This will help us to mitigate the risk from each stations. Is there any way that the following 10 conditions result can return in one cell. Basically it is very critical to identify the high critical stations.

    Thank you very much for your kind reply. I definitely owe you a gift!!!

    Kind Regards,
    Shameen
    1. If any HIGH CRITICAL station is RED, then group = RED.
    2. If greater than or equal to 50% of the HIGH CRITICAL stations are AMBER (and no less than 2) then Group = RED
    3. If greater than or equal to 70% of MEDIUM CRITICAL stations are RED 9 (and no less than 3) then Group = RED
    4. If less than 50% of HIGH CRITICAL stations are AMBER & greater than or equal to 70% of MEDIUM CRITICAL stations are AMBER then Group = RED
    5. If any HIGH CRITICAL station is AMBER, then Group = AMBER
    6. If any MEDIUM CRITICAL station is RED, then Group = AMBER
    7. If greater than or equal to 50% of MEDIUM CRITICAL stations are AMBER (and no less than 3), then Group = AMBER
    8. If greater than or equal to 70% of LOW CRITICAL stations are RED (and no less than 2), then Group = AMBER
    9. If less than 50% of MEDIUM CRITICAL stations are AMBER & greater than or equal to 70% of LOW CRITICAL stations are AMBER then Group = AMBER
    10. All other conditions that do not fit into the above scenarios, the Group = GREEN

  4. #4
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting Formula By Using Colors In the Cells

    Hi, Is there any way thaAttachment 500593t I can share the full file with you .

    The results of the above 10 conditions required on the below highlighted box..

    Regards,
    Shameen
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting Formula By Using Colors In the Cells

    Hi, Sorry for the mess. Further to the previous communication. The true or false statement doesn't help to analyse the risk of each station. Only way it will help to anlyse the risk factor of each station is to compare the relation between the criticality and integrity status by applying the 10 business rules. This means that the criticality and ingrity columns will need to return the result in one cell by considering the 10 rules. I am also attaching the algorithm of the result which I am looking for to get.

    Kind Regards,
    Shameen
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,843

    Re: Conditional Formatting Formula By Using Colors In the Cells

    If I understand correctly the color needs to be applied to the merged cells in row 20. There are two conditional formatting rules based on the following formulas. For Red fill:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    For Amber fill:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The cells have green fill applied as a default which will remain unless overridden by one of the other two rules.
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting Formula By Using Colors In the Cells

    Yes sir, the results required on the raw 20. At the same time the criticality doesnt change because thats the station risk fixed to each station. only the the integrity status changes. So the result will be cirticality Vs. integrity. For eg. For this week, the integrity status of 3 low critical ciritical stations (Field Name: Criticality) are red due to the critical lifting and the integrity status of 5 Medium critical stations are red, then it should change accordingly by applying 10 business rules.

    Thanks for your kind support.

    Regards,
    Shameen

  8. #8
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Thumbs up Re: Conditional Formatting Formula By Using Colors In the Cells

    You are awesome! Genius, No words to describe!!! In the formula you have share all the conditions words except line item #. 4 and #6 as copied below. Is there any that I can include the below as well. Attached here with the test results of the formulas you have made

    4. If less than 50% of HIGH CRITICAL stations are AMBER & greater than or equal to 70% of MEDIUM CRITICAL stations are AMBER then Group = RED

    5. If any MEDIUM CRITICAL station is RED, then Group = AMBER

    Great job!!!

    Regards,
    Shameen
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,843

    Re: Conditional Formatting Formula By Using Colors In the Cells

    I believe the following formulas will solve the issues from post #8.
    The formula for the red rule should read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The formula for the amber rule should read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    On the attached file I included the formulas that govern rules #4 and #6, the ones that were listed as 'This does not work' in the 'Test' column, in cells G2:G3.
    Let us know if you have any questions.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting Formula By Using Colors In the Cells

    Hello JetMc, Thanks for the formula. I found some minor error when applying the formulas. Can you kindly help to sort the points stated on the attached file.

    Regards,
    Shameen
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-01-2017
    Location
    Oman
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting Formula By Using Colors In the Cells

    Further to the post no. 10, I also made another file and made the test. In fact, i am stuck in between and the result attached for your kind information.

    Regards,
    shameen
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,843

    Re: Conditional Formatting Formula By Using Colors In the Cells

    Re: post #10.
    This is what I was talking about in post #2, the way the fourth rule is written causes the situation that is stated in the 'test results' column.
    4.*If less than 50% of HIGH CRITICAL stations are AMBER & greater than or equal to 70% of MEDIUM CRITICAL stations are AMBER then Group = RED
    If less then 50% can mean 0% so even if no high critical stations are amber as long as 70% of the medium critical stations are amber it will result in RED
    I would suggest that the rule be written that if there is at least one high critical station that is amber and if at least 70% of the medium stations are amber then it will result in RED.
    In the attached file I changed the part of the RED conditional formatting formula that looks at the fourth listed rule so that it reads:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Notice that the entire conditional formatting formula is tested in cell I2 and that the color of B3 is green as would be expected.
    Re: Post #11 (I am going to wait and see if the proposed change above is acceptable before working on the issues noted in column N of the file attached)
    Let us know if you have any questions.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 12-05-2016, 10:59 AM
  2. Conditional Formatting more than 3 colors via vba
    By FastFish in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2015, 12:24 PM
  3. [SOLVED] Fill colors of cells using Conditional formatting based on 3 criteria
    By Sai Prashanth in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-22-2014, 12:39 PM
  4. [SOLVED] Formula based off cell colors / conditional formatting?
    By dsciola in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-30-2013, 03:48 AM
  5. Replies: 1
    Last Post: 08-16-2012, 10:51 AM
  6. Replies: 3
    Last Post: 08-08-2008, 06:12 AM
  7. Replies: 9
    Last Post: 03-24-2008, 03:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1