+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting, formula breakdown .

  1. #1
    Registered User
    Join Date
    05-19-2014
    Location
    california
    MS-Off Ver
    excel 2016
    Posts
    41

    Conditional formatting, formula breakdown .

    Hi Guys,


    I been addicted to excel and this is killing me, I don't know how to do this, maybe someone can help me but what I really like to do, is i like to know how to do it!!!!.


    I want a formula that can link to expiration date, where like if it's 35 days or lower to today's date, i want that row in red. but if that expiration date is 36 to 50 days close to today's date, i want it to stay light yellow. the rest can stay the same.



    please help me, and if you can please explalin the formula, i'ts driving me crazy!!!.

    i had something like this but IT AIN'T WORKING, =if(L2-D5=<35) then i wanted to apply a rule to that if it were true, the rule was for the entire to turn the proper color, depending on the date.
    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.84 (24041420))
    Posts
    8,751

    Re: Conditional formatting, formula breakdown .

    for RED use
    =AND($D5<=TODAY()+35,$D5<>"")
    for yellow use
    =AND($D5<=TODAY()+50,$D5<>"")

    Apply to the range
    $A$5:$I$500
    or what ever range you want to apply to

    order the rules for red to be first and stop if true

    see the attached
    Attached Files Attached Files
    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
    Registered User
    Join Date
    05-19-2014
    Location
    california
    MS-Off Ver
    excel 2016
    Posts
    41

    Re: Conditional formatting, formula breakdown .

    HI Etaf,

    well first of all THANK YOU!!!!. I am obsess with excel, so I want to ask you. I am trying to understand the formula you created because, I want to be able to do things on my own. so, can i ask you. I would had thought that the formula would start with "=IF" what does this "and" mean???. is this a good formula for color coding??.. if it is, wow!! I am impressed.


    also, your formula


    =and($D5,=TODAY()+35,$D<>"")

    1. when is "and" good to use for?.
    2. "$D5 did you lock D5 because you are only worry about that date so that you can apply the conditional formatting just on that date and row. right?. I think so.
    3.Obviously I'm reading the formula wrong, this is what I understand. when i translate your formula i read this. "add D5 plus today's date plus 35, but i don't what $D<>"") does.


    THAAAAAAAAAAANK YOUUUUUUUUUUU!

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formatting, formula breakdown .

    Happy to answer

    If the formula was in a cell - you could have used an IF to put a result if true or false

    in conditional formatting the format is only applied if the condition is true - so you only need the condition to test
    Hence no IF

    ie
    in condition formatting
    =B2=0
    that would be true if cell B2 = 0 and then would apply the condition when true
    1. when is "and" good to use for?.
    AND
    is a logical function when you want various conditions to be tested

    B2=0 AND C2=0 AND D2=0 will be true when all those formula are TRUE - HENCE the AND

    to write that out as a formula
    =AND(B2=0 , C2=0 , D2=0)

    There is also an OR function
    B2=0 OR C2=0 OR D2=0 will be true when any of those formula are TRUE - HENCE the OR

    2. "$D5 did you lock D5 because you are only worry about that date so that you can apply the conditional formatting just on that date and row. right?. I think so.
    NO
    because you wanted the ROW highlighted when D is TRUE
    if i had put D5 and applied to A5:I200
    the column would also move in the formula
    so it would test A5,B5,C5
    I only want when in CELL A5 to test if D5
    so the $ locks that in and applies to the ROW

    3.Obviously I'm reading the formula wrong, this is what I understand. when i translate your formula i read this. "add D5 plus today's date plus 35, but i don't what $D<>"") does.
    one of the TESTs
    =AND($D5<=TODAY()+35,$D5<>"")

    today()+35
    so add 35 to todays date

    now i test to see if the date in D5 is less than or equal to today()+35days
    today() = 5/6/14
    today() + 35 = 10/7/14 (UK dates format - DD/MM/YY)

    Is D5 date less that 10/7/14 - if that is TRUE - then 1 part of the AND is TRUE
    but we have to have both parts TRUE

    if D5 is blank - excel will see that as zero - and so 1/1/1900
    which is less that 10/7/14
    so all blank ROWS will also highlight
    to stop that I want to test if the cell is blank
    D5=""
    BUT , i want it to only highlight when it is NOT blank
    <> is not equal
    2nd part of the formula
    $D5<>""

    if D5 is NOT a blank cell - will be TRUE

    The AND will only return a TRUE if both those formula are TRUE
    and highlight the row

    hope that helps - if not let us know

  5. #5
    Registered User
    Join Date
    05-19-2014
    Location
    california
    MS-Off Ver
    excel 2016
    Posts
    41

    Re: Conditional formatting, formula breakdown .

    marvelous!!!.


    thank you , this just tells me i need to learn a lot more, THANK YOU!!!!! HAVE A GREAT GREAT DAY!!

+ 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. Exception/time breakdown by date; formatting and presentation
    By horariatersenha in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-11-2014, 05:41 PM
  2. Show breakdown of a SUM formula
    By mvb83 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2013, 10:08 AM
  3. Breakdown hours (formula)
    By city in forum Excel General
    Replies: 2
    Last Post: 06-12-2012, 10:49 AM
  4. Breakdown a formula
    By Lucky_git in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-10-2011, 11:08 AM
  5. Formatting percentages breakdown into a chart
    By fatpiggy123 in forum Excel General
    Replies: 0
    Last Post: 10-23-2009, 05:52 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