+ Reply to Thread
Results 1 to 3 of 3

Conditional Formating to compare 2 dates and hghlight

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Conditional Formating to compare 2 dates and hghlight

    Hello:

    Please refer to attached file.
    I am trying to use conditional formating as follows.

    If The date in column A (A5<>P2,A<>T2,A7<>X2, and so on ) then highlight the cell in column E to Red.
    However, it seems not to work.
    I have attached a picture within excel file to show you my formula (1st formaula in pic).


    Let me know if you have any questions.
    Thanks.



    Riz
    Attached Files Attached Files
    Last edited by rizmomin; 08-13-2014 at 11:53 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Conditional Formating to compare 2 dates and hghlight

    Your conditional formatting formula in column E says to fill the cell red if the date in column A does not match the text in column F which is true. Therefore the red fill colour is correct.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    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,917

    Re: Conditional Formating to compare 2 dates and hghlight

    IF - Im looking at the right column (column E?) then your CF rule formula makes no sense...
    =F5&"2"<>A5
    F5=P
    "2" is text so F5&"2" (same as F5&2) is P2 (text, not a cell ref)
    so you are asking is P2<>8/1/2014 (a date) which is TRUE, so the CF rule will trigger

    I think what you mean/want is...
    =INDIRECT(F5&2)<>A5
    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

+ 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: 03-14-2014, 04:03 AM
  2. Replies: 4
    Last Post: 01-23-2014, 10:14 AM
  3. Replies: 6
    Last Post: 08-14-2006, 05:00 PM
  4. Replies: 2
    Last Post: 03-27-2006, 12:10 PM
  5. Install dates formating using conditional formating?
    By Jerry Eggleston in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 01:49 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