+ Reply to Thread
Results 1 to 3 of 3

Compare dates, highlight cell

  1. #1
    Registered User
    Join Date
    04-26-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    13

    Compare dates, highlight cell

    Can anyone help me determine the proper formula(s) to express the following required functions?

    If Cell Date in Column B is the same as Cell Date in Column A, Cell in Column C is 0
    B1(4/20/16) A1(4/20/16) C1(0)
    If Cell Date in Column B is 1 day > Cell Date Column A, Cell in Column C is 1
    B1(4/21/16) A1(4/20/16) C1(1)
    If Cell Date in Column B is 2 day > Cell Date Column A, Cell in Column C is 2
    B1(4/22/16) A1(4/20/16) C1(2)
    If Cell Date in Column B is 3+days > Cell Date Column A, Cell in Column C is 3+
    B1(4/25/16) A1(4/20/16) C1(3+)

    THEN...

    If the Cell in Column C is 0, Cell Date in Column B stays CLEAR
    If the Cell in Column C is 1, Cell Date in Column B turns GREEN
    If the Cell in Column C is 2, Cell Date in Column B turns YELLOW
    If the Cell in Column C is 3+, Cell Date in Column B turns RED


    Please see the below example that I have been doing manually.

    Thank you!!!
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Compare dates, highlight cell

    In conditional formatting formulas, set up these in B2 and apply to all cells in the column B range:
    =$B2-$A2=1 for the green formatting
    =$B2-$A2=2 for the yellow formatting
    =$B2-$A2>=3 for the red formatting
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  3. #3
    Registered User
    Join Date
    04-26-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    13

    Re: Compare dates, highlight cell

    Thank you, gak67!!!

+ 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. Compare cell content with other workbook and highlight
    By yokeses in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2016, 08:22 AM
  2. Compare Two Fields and Highlight Cell if Different.
    By DougDeVoe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2014, 12:09 AM
  3. Replies: 3
    Last Post: 09-08-2014, 10:36 AM
  4. Replies: 1
    Last Post: 09-05-2014, 08:40 AM
  5. [SOLVED] Compare two colums from different sheets and to highlight the different cell in sheet 2
    By Thinker8 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-26-2013, 04:46 AM
  6. Compare values in a different cell and highlight if wrong
    By traciey in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-26-2012, 06:12 PM
  7. Cell compare and highlight macro allowing user to select data ranges
    By Nikalin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2010, 04:59 PM

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