+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting/coloring depending on values of 2 different cells

  1. #1
    Registered User
    Join Date
    10-14-2022
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    2

    Conditional formatting/coloring depending on values of 2 different cells

    Hello

    I have spent my whole 2 full days trying to solve this one and i was no able therefore i am asking please for your help.

    I have a simple table that includes 3 Tactics : A, B and C.

    Each Tactic is defined by 2 numerical parameters (Parameter 1 and Parameter 2) which are set and fixed in advance (I do not modify them).


    Tactic A is the best then comes B and last is C.

    Tactic A has the lowest parameters then comes B then C.

    Each day i measure from the stars in the sky parameters 1 and 2 for the Day and insert them in my table (in the 2 cells in Yellow).

    For me to be able to use a tactic, both parameters measured for the day MUST be below the predefined parameters for the tactic to be used.

    Then I would like, please, that my table automatically formats/colors in Green only one Tactic that has both parameters 1 and 2 below the parameters measured for the day.

    In case the parameters of the day allow me to use several Tactics then i would like, please, that the table only highlights the best tactic: A, then B then C.

    I have attached the table in 4 different examples with 4 different sets of parameters for the day an example:

    Case 1 The parameters for the day fall under the parameters of all 3 tactics, but since tactic A is the best then it is solely colored in green.
    NB:i do not mind if only cell A is colored in green and not the whole line for the parameters


    Case 2 we can see that parameter 1 is not OK for tactic A but OK for tactic B and C. On the other hand parameter 2 is OK for all 3 tactics therefore we have the choice between tactic B and C only (since A is excluded due to parameter 1). Since B is better than C only B is colored in green.

    Case 3 Parameter 1 is OK for 3 tactics but since parameter 2 is only OK for tactic C then Tactic C is colored in green only

    Case 4 all parameters are not OK for all 3 tactics so nothing is colored in green.

    Please i would be so grateful for your assistance.

    Thanks
    Best regards
    BlueOcean
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    845

    Re: Conditional formatting/coloring depending on values of 2 different cells

    Hi there,
    A possible solution via some helper columns (you can hide them if you like or move onto another sheet). I find it sometimes easier than trying to get a more complex criteria into conditional formatting.

    Basically we check each parameter column if it is meeting the core criteria, then calculate the variance. The closer the match, the lower the difference.
    Do the same for the second parameter and add them together.
    Now we are looking for the minimum value and use this as the criteria for the conditional formatting.

    Let us know if that works for you.
    Attached Files Attached Files
    If your Question is answered; please mark it SOLVED. If you are happy with a member's solution, say 'Thanks' and click the 'Star' to Add Reputation.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,368

    Re: Conditional formatting/coloring depending on values of 2 different cells

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new here, I shall do it for you THIS TIME ONLY: https://forum.ozgrid.com/forum/index...rent-cells%2F= and https://www.mrexcel.com/board/thread...cells.1219378/)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    10-14-2022
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Conditional formatting/coloring depending on values of 2 different cells

    Dear Sir or Madam,

    Thanks a lot for your great help, you are literally a genius of Logic.
    I Salute you for your good Karma and sense of kindness towards others.
    Best Regards
    BlueOcean

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,368

    Re: Conditional formatting/coloring depending on values of 2 different cells

    Please acknowledge that you have read and understood post #3. Thanks.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,368

    Re: Conditional formatting/coloring depending on values of 2 different cells


+ 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: 5
    Last Post: 10-14-2020, 02:08 PM
  2. [SOLVED] How to use conditional formatting on multiple cells, depending on other cell values
    By Supersadie in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-03-2018, 01:59 PM
  3. Conditional Formatting - coloring cells between dates
    By HabsFan89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-22-2014, 03:42 PM
  4. [SOLVED] Conditional Formatting - Coloring Cells based on Values
    By desibabuji in forum Excel General
    Replies: 8
    Last Post: 11-22-2013, 12:31 PM
  5. [SOLVED] Conditional formatting - coloring cells across array if value exists in a list
    By mudder12 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-05-2012, 12:38 PM
  6. Conditional Formatting - Coloring Cells in Rows according Text in it
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2012, 01:28 AM
  7. Replies: 7
    Last Post: 02-06-2012, 01:13 PM

Tags for this Thread

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