+ Reply to Thread
Results 1 to 13 of 13

Conditional Formatting between two dates that are not today!

  1. #1
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Conditional Formatting between two dates that are not today!

    I know this is fairly easy but I just don't get it!

    I would like to change the colour of the date in the second column:
    to red if it is more that 7 days from the first column
    to green if it 7 days
    to blue if it is less than 7 days

    Column 1 | Column 2
    Sent To Print | PRINTED
    1-Jan-14 | 9-Jan-14
    Last edited by IreneADS; 01-15-2014 at 05:43 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting between two dates that are not today!

    Hi and welcome to the forum

    Assuming your dates ARE actual dates and not text that looks like dates (test with -isnumber() )
    I dont have 2003 here so this is coming from memory and may be off...
    go into CF, select USE FORMULA (I think thats what its called there, its the 2nd drop-down in there)
    enter =A2+7>B2 format fill RED
    select New Rule
    repeat the above for =A2+7=B2
    A2+7<B2
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Conditional Formatting between two dates that are not today!

    Hi Ford

    I'm going to post an actual sample attachment. The need became more complicated and I can't seem to apply the formula as you indicated. Can you look at the sample and see what can be done?

  4. #4
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Conditional Formatting between two dates that are not today!

    HPS Sample2.xlsx Attaching sample

  5. #5
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Conditional Formatting between two dates that are not today!

    Take a look at this.
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  6. #6
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Conditional Formatting between two dates that are not today!

    Perfect! Exactly what I was trying to do!

    Thanks You

  7. #7
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Conditional Formatting between two dates that are not today!

    Popipipo, I used your work, but I changed it to fit my whole form and I changed it to colour text, not coloured fill. It is easier to look at that way.

    Now I am wondering how I can go about counting the colours in their columns...
    I was trying to work out the calculation in cell H22 of the attached file.

    Colour Count sample.xlsx

  8. #8
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Conditional Formatting between two dates that are not today!

    I think you can't count colors that made by conditional format.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting between two dates that are not today!

    No you cant, But another option is to filter on the color and count that.

    Also, I didnt really look at your CF rules yet, but maybe you could use countif() based on that?

    I notice that the file you uploaded indicates 2007 or later (.xlsx), but your profile says 2003. Please update your profile as necessary, members tailor questions based on your excel version

  10. #10
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Conditional Formatting between two dates that are not today!

    So how do I..." filter on the color and count that"?

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional Formatting between two dates that are not today!

    say for the first one you can use the same rules as in your conditional format
    in sumproduct()
    =SUMPRODUCT(--($H$2:$H$17=$F$2:$F$17+56)*($H$2:$H$17<>""))
    =SUMPRODUCT(--($H$2:$H$17<$F$2:$F$17+56)*($H$2:$H$17<>""))
    =SUMPRODUCT(--($H$2:$H$17>$F$2:$F$17+56)*($H$2:$H$17<>""))
    giving
    Books approved early 0
    Books Approved on time 3
    Books approved late: 13
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  12. #12
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Conditional Formatting between two dates that are not today!

    Thanks Martin

    Will give it a try and let everyone know how it worked.

  13. #13
    Registered User
    Join Date
    01-02-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Conditional Formatting between two dates that are not today!

    Worked very well, Thank You

    I am very impressed with the patience and knowledge of the people on this site.

+ 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: 12-31-2013, 01:44 AM
  2. Replies: 3
    Last Post: 11-20-2013, 08:42 AM
  3. [SOLVED] Conditional Formatting of: dates within 1 month and dates before today.
    By Luke Smith in forum Excel General
    Replies: 5
    Last Post: 06-18-2013, 07:29 AM
  4. Conditional format between dates based on today()
    By StevieNix in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-27-2012, 06:06 PM
  5. [SOLVED] Conditional Formatting ... Today() & More
    By Ken in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-09-2005, 11:06 AM

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