+ Reply to Thread
Results 1 to 10 of 10

Conditional formatting - various rules in one cell

  1. #1
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Conditional formatting - various rules in one cell

    Hi - Please find attached my sample.

    This is basically a variety of steps - required timescales (SLA's) and action completed dates. hopefully you can follow it. Point 1 is definitely a conditional formatting but im not sure if anyone can help me with point 2 & 3 here also? I am aware that these are What if functions but I don't want to post this twice and contravene rules.

    to be formatted in all the columns which are (received)

    Point 1)
    **if 2a [J2] is before 2a [I2] the highlight green as per sample.
    **if 2a [J3] is later than 2a [I3+7days] the highlight red as per sample.
    **if 2a [J4] is later than 2a [I4] but before [I4+7days] the highlight amber as per sample.

    Point 2)
    Column M - if using the rules above the Timescale has been met or not with [yes/no/nearly] using an IF function? this will enable me to run pivot table at a later date (which I know how to do)

    Point 3)
    4a - date needs to populate as the later of 1) 2b - received [K] or 2) Step 7 [Z]

    Thanks for your help!!
    Attached Files Attached Files

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

    Re: Conditional formatting - various rules in one cell

    1. Select J2 to J4 and select conditional format, new rule, use formula to determine format.

    You will need to do this three times to enter three conditional format rules

    a:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Fill Color Green
    b:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Fill Color Red
    c:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Fill Color Amber

    2. Your sample results for M2 to M4 do not read right:

    Nearly
    No
    Yes


    I expected

    Yes
    No
    Nearly


    Formula for M2

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



    Formula for R2 if your example is correct

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


    Corrected Formula for R2.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by mehmetcik; 09-20-2017 at 02:07 PM.
    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.

  3. #3
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Conditional formatting - various rules in one cell

    Quote Originally Posted by mehmetcik View Post
    1. Select J2 to J4 and select conditional format, new rule, use formula to determine format.

    You will need to do this three times to enter three conditional format rules

    a:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Fill Color Green
    b:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Fill Color Red
    c:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Fill Color Amber

    2. Your sample results for M2 to M4 do not read right:

    Nearly
    No
    Yes


    I expected

    Yes
    No
    Nearly


    Formula for M2

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



    Formula for R2 if your example is correct

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


    Corrected Formula for R2.

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



    Hi - this is fantastic and a massive help!! and works for the majority of the points.

    I have uploaded my sample updated with the information you have given me but im still doing something wrong.

    For instance - if oi update J10 from 14/07/17 to 15/07/17 the Cell J15 changes? and I have no clue as to why?

    also I didn't account for No also being a response in the received columns - which should ordinarily be left blank with no colour.

    and J17 should also be Amber not red - which tells me I have definitely done something wrong.

    and just a query?? when I update a date im assuming the cell colour updates automatically? without the need to refresh??

    Thanks for your help - this has been invaluable tonight as I have been trying this for ages!

    Lorna B
    Attached Files Attached Files

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

    Re: Conditional formatting - various rules in one cell

    For instance - if I update J10 from 14/07/17 to 15/07/17 the Cell J15 changes? and I have no clue as to why?

    You used the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for the range $J$7:$J$32
    So if J2 < I2 then J7 will be red

    You should have used the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then if J7 < I7 then J7 will be red

    also I didn't account for No also being a response in the received columns - which should ordinarily be left blank with no colour.
    Try this formula instead
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Your third formula should then be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by mehmetcik; 09-21-2017 at 06:27 PM. Reason: Corrected Typo

  5. #5
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Conditional formatting - various rules in one cell

    THe only problem I am having is the cell does not go white (or blank) when No is an option. (it goes red) and when blank (goes green)

    the range now has the following rules.
    =AND($J$2<>"No",$J$2>$I$2,$J$2<I+7) - BLANK
    =AND(J2>I2,J2<I2+8) - AMBER
    =J2>$I$2+7 - RED
    =J2<=I2 - GREEN

    THanks for your help.

  6. #6
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Conditional formatting - various rules in one cell

    so I have copied these rules to a completely new worksheet (the actual workbook I need) but it doesn't seem to be working. and its exactly the same columns as the sample doc! arrggghhh - what have I done wrong!

  7. #7
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Conditional formatting - various rules in one cell

    Quote Originally Posted by Lorna B View Post
    so I have copied these rules to a completely new worksheet (the actual workbook I need) but it doesn't seem to be working. and its exactly the same columns as the sample doc! arrggghhh - what have I done wrong!
    Ok ok - so I got it working!!! silly me with all the $$$$

    but - on a serious note the only rule that is not working is the following one.

    =AND(J1<>"No",J1>I1,J1<I+7)

    I want this to show as formatted white (or blank) if the cell is blank or has No

    Thanks again

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

    Re: Conditional formatting - various rules in one cell

    Maybe

    =AND(J1<>"No",J1>I1, J1<I1+7)

    or

    =AND(J7<>"No",J7>I7,J7<I7+7)

  9. #9
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Conditional formatting - various rules in one cell

    No neither are working - hummm.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,542

    Re: Conditional formatting - various rules in one cell

    Lorna B
    I want this to show as formatted white (or blank) if the cell is blank or has No
    It would seem like the rule could read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If I am missing something then it would be helpful if you could upload another sample of the file and an explanation of what cells are still not formatting correctly.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Issue with cell fill using conditional formatting rules
    By VB_kid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2016, 11:34 AM
  2. [SOLVED] Conditional Formatting - creating rules based on colours in cell list
    By milkychips in forum Excel General
    Replies: 5
    Last Post: 01-02-2016, 12:00 PM
  3. conditional formatting rules for a cell on sheet 1 based on rules from sheet 2
    By jsard in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 08-15-2013, 09:22 AM
  4. [SOLVED] Conditional Formatting: Comparing cell with a column of values and applying 3 rules
    By ab231 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2013, 10:30 AM
  5. Replies: 1
    Last Post: 06-21-2013, 04:20 PM
  6. 3+ Conditional Formatting Rules for cell range based on Formula from other cells
    By osborsm9 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2013, 08:48 PM
  7. Replies: 2
    Last Post: 06-08-2012, 05:47 AM

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