+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting with reference to other cells and with multiple rules(in the table)

  1. #1
    Registered User
    Join Date
    09-18-2020
    Location
    Barcelona
    MS-Off Ver
    365
    Posts
    1

    Conditional Formatting with reference to other cells and with multiple rules(in the table)

    Good time of the day to you all!

    I have a problem with conditional formatting and really hope that someone could help

    In the below table the formatting needs to be applied to the columns D, E, F
    and it should be based on the values in columns A & C with the following condition:

    * if cell D4 >= cell A4, cell D4 needs to turn green
    * if cell D4 <= cell C4, cell D4 needs to turn red
    * if cell D4 =AND(D4<A4, D4>C4), cell D4 needs to turn yellow


    These 3 rules should be applied to all cells in columns D, E, F. However when I select for example column D4:D17 and set the above rules in the conditional formatting section, the colors are applied in the end, but only green and red, and it is also showing wrong colors (you can see it in the file attached).

    I feel like I am missing something, an additional condition maybe or the order of the rules... I have tried to tweak the formulas, use $$ on the cells from columns A & C, but nothing seems to work.

    Below I pasted a photo of the table and I also added a file where you can see the table and the conditional formatting rules that I have applied.

    I would really appreciate any help, and please tell me if I didn't explain myself well and I will try again.

    1600432920656.png

    Many many thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,319

    Re: Conditional Formatting with reference to other cells and with multiple rules(in the ta

    You probably need to make references to columns A and C absolute, and references to columns E to F relative. Row refernces should all be relative.

    So, for yellow:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    for red
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    for green
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And maybe tick Stop if True

    Apply to cells =$D$3:$F$16
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Conditional Formatting with reference to other cells and with multiple rules(in the ta

    You Applied a $ before the row number in your conditional formats so all your rules were looking at Row 3.

    Should be:
    =AND(D3>$C3,D3<$A3) For Yellow
    Attached Files Attached Files
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Registered User
    Join Date
    08-06-2012
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    Excel 2021, Google Sheet
    Posts
    38

    Re: Conditional Formatting with reference to other cells and with multiple rules(in the ta

    I have applied conditional formatting rules in the attachment file.

    So have a look the attachment.
    Attached Files Attached Files

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,852

    Re: Conditional Formatting with reference to other cells and with multiple rules(in the ta

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

    https://www.mrexcel.com/board/thread...table.1146093/
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Conditional Formatting Reference Multiple Cells?
    By jtakajr in forum Excel General
    Replies: 1
    Last Post: 08-09-2019, 02:32 PM
  2. Replies: 3
    Last Post: 10-24-2016, 01:25 PM
  3. Replies: 6
    Last Post: 10-29-2015, 03:38 PM
  4. [SOLVED] Using if and And together in conditional formatting multiple rules!
    By Katieloulouise in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-03-2015, 01:00 PM
  5. Conditional Formatting, multiple rules
    By jsch08 in forum Excel General
    Replies: 1
    Last Post: 04-30-2013, 11:30 PM
  6. Conditional Formatting with multiple rules
    By carrod65 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2012, 03:43 PM
  7. Conditional formatting multiple rules
    By candrew03 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-16-2011, 02:35 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