+ Reply to Thread
Results 1 to 6 of 6

Please help to understand to conditional formatting logic

  1. #1
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Question Please help to understand to conditional formatting logic

    Dear Excel Expertise,
    I have small question regarding conditional formatting and i have been cracking my head to understand how exactly this works.

    Attached file has 2 different conditional formattings using formulas with same criteria.
    1. With criteria cell on right side of formatting data:
    I want to know why one first column cells get formatted.? I am assuming, when i write relative references, conditional
    formatting will check for criteria in all cells ($A$2:$D$7) and must color it. But my assumption is wrong in this case as it stops at first column itself.
    Please help me to understand the logic behind.

    2. With criteria cell on left side of formatting data:
    This works as per my assumption above..:D . Will conditional formatting check for criteria in all cells ($A$10:$D$15) and colour it if its true.?
    why it will not do the same when criteria is on right side.? Obviously there is a difference between both scenarios and i am eager to understand it.

    My question may be silly but will be of great help if anyone can help me to understand this difference.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,731

    Re: Please help to understand to conditional formatting logic

    you have said D2 = YES
    so that will apply for A2:D7 cells

    BUT it starts at the start of the range

    so in A2 it is checking if D2 =Yes
    in B2 its checking E2
    C2 checking F2
    etc

    add a dollar

    why are you starting D2

    Whats the rules meant to do

    IF A2 = Yes highlight
    OR is it to do with column D

    explain the RULES

    A2 will be coloured - BECAUSE
    B2 will be coloured - BECAUSE
    etc
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Please help to understand to conditional formatting logic

    Right to Left:

    Your formula is applied to $A$2:$D$7 range.

    So, relative reference when formula is evaluated for A2 is D2. All columns to right of that will then be offset by one column to right.
    Those are all empty, so your formatting isn't applied.

    Left to Right:
    Your formula is applied to $A$10:$D$15

    Relative reference at A10 is set to A1. So all the cells are checking corresponding cell in $A$1:$D$6 range.
    And isn't really checking what you are expecting.

    What is it exactly that you are looking to do?
    Detail in word which cell should be checked for which cell (give few examples for both cases).
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Registered User
    Join Date
    11-15-2017
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Office 365
    Posts
    67

    Re: Please help to understand to conditional formatting logic

    Your formula was wrong.
    I presume Cell D2 will always contain "Yes", so if you use the formula
    Please Login or Register  to view this content.
    and then input your formatting it should work as per attached

  5. #5
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Re: Please help to understand to conditional formatting logic

    Hi Etaf,
    I think i got your point and understood the logic behind... Relative reference is the concept behind.!
    Many thanks for your explanation.

  6. #6
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Re: Please help to understand to conditional formatting logic

    Hi CK76,
    Same is the case with your explanation... THough i got confused with below explanation, but i got the point..

    Left to Right:
    Your formula is applied to $A$10:$D$15

    Relative reference at A10 is set to A1. So all the cells are checking corresponding cell in $A$1:$D$6 range.
    And isn't really checking what you are expecting.


    Many thanks for your explanation.

+ 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. [SOLVED] conditional formatting with IF(AND logic
    By jah72773 in forum Excel General
    Replies: 8
    Last Post: 04-03-2019, 04:14 PM
  2. how to understand the logic about this
    By fabinhovai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-29-2015, 09:54 PM
  3. I'd like to understand the logic behind this formula
    By guillermoftw in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-09-2014, 10:58 PM
  4. Please Help. Got Logic but dont quite understand how to Code it . Thanks :)
    By simplificated in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2013, 06:25 PM
  5. [SOLVED] Conditional formatting with AND logic
    By m3rl1n in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-01-2013, 08:34 PM
  6. Logic and conditional formatting
    By Keeleyjayne in forum Excel General
    Replies: 4
    Last Post: 10-14-2011, 06:43 AM
  7. Replies: 3
    Last Post: 07-16-2010, 05:50 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