+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting on another cells date value to the current cell date

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    Yeovil
    MS-Off Ver
    Excel 2007
    Posts
    8

    Conditional Formatting on another cells date value to the current cell date

    Hi,

    I'm trying to do a conditional formatting where if i.e. col A has a date in it, if it is more than 28 before col B's date, it highlights green.

    I have been able to do my 2 others where if it is 3 weeks before, it shows amber and if it is 2 weeks or less it shows red but the green is only showing the exact 28 days and not anything more than that.

    It is also showing the cell as green when there is nothing in col A which I don't want, I want it to be no colour.

    I've attached my example spreadsheet which has my current working formatting.

    Can someone help me please, it's driving me nuts trying o figure it out!!

    Thanks
    Attached Files Attached Files

  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,938

    Re: Conditional Formatting on another cells date value to the current cell date

    try =B1-A1>=28
    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
    05-24-2012
    Location
    Yeovil
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditional Formatting on another cells date value to the current cell date

    It seems to have done it. It is still making my cell green when A is blank though?

    Any ideas?

  4. #4
    Registered User
    Join Date
    11-16-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Conditional Formatting on another cells date value to the current cell date

    jennys,
    See the attached. I changed the green formula to include an if statement, so excel says "if there is a non-zero value in A, is it greater than 28 before B? If there is no value in A, it puts in "NA" (text value) and the test fails."
    Tell me what ya think.

    excel example.xlsx

  5. #5
    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,938

    Re: Conditional Formatting on another cells date value to the current cell date

    =and(A1<>"",B1-A1>=28)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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