+ Reply to Thread
Results 1 to 16 of 16

Conditional formatting date cells based on entry in adjacent cell

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8

    Unhappy Conditional formatting date cells based on entry in adjacent cell

    Hi,

    I have a spreadsheet with 'due date' for returns in column L and 'received date' for returns, in the adjacent column M.

    I would like to get the due date to turn red when it is overdue, ie. the date in the cell has arrived and no return was submitted. By trawlling the forum, I managed to accomplish this with the following in conditional formatting:
    Cell value is less than or equal to =TODAY()

    All's great.....but - I would like the date to turn back to black if I enter a date in the adjacent received column, column M.

    In other words, I want to flag a problem if the due date has passed, but once I receive the return and enter the date I receive it, i would like the due date entry to revert back to the original formatting ie. black. So only the outstanding returns are highlighted.

    Any help would be greatly appreciated.

    Regards, NickyJ

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try changing CF to:

    Formula Is >> =And(L1<=Today(),M1="")

    where L1, M1 are the top most cells in the selection.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Add a second condition on the cell when you enter another date
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8
    Thanks for the suggestion NBVC, but no luck, it didn't work I'm afraid.

    Old Chippy - if you can help with a 2nd condtion, that would be great - only used conditional formatting for the first time this morning, so struggled with the 1st condtion never mind a second one!!

    Cheers, Nicky

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by NickyJ
    Thanks for the suggestion NBVC, but no luck, it didn't work I'm afraid.


    Cheers, Nicky
    It should work... my formula will turn the cell red if the date in the cell is today or earlier and there is nothing in column M.

    Note: I used L1 and M1 in my formula... you will need to change those to whatever cell references you are referring to. Then you can copy and Paste Special >> Formats to cells below.

  6. #6
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8
    Thanks NBVC for your help with this.

    Unfortunatley, I'm still not having any luck. I did replace the cell reference in the formula with my own, but still no luck. I have copied the rest of the formula exactly, but still to no avail. I've also tried it on different cells (just in case I've done something 'dodgy' with the other cells without realising it!)

    If there's something obvious that I'm missing - it won't stand out I'm afraid, as I said, I only discovered conditional formatting yesterday. Sounds like a wonderful invention...... eventually!?!?

    Thanks again

    Nicky

  7. #7
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8
    NBVC - I also notice when I go back into CF to check if I've typed in the formula correctly, excel has added extra '=' and " symbols?

    Any ideas? please

    Regards, Nicky

  8. #8
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Remove the extra quotes and it should work then

  9. #9
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    May be this will help?
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8
    Thanks for the zip file Old Chippy - it looks great and I'm sure we're half way there (do I sound like I know what I'm talking about!)

    I have opened the file and entered today's date (23rd July) in the Rec'd column and the due date does indeed turn back to black; but can you tell me why the dates lower down the column (24th, 25th and 26th July) are red, when they are not due yet? and the other dates before today are still black, even though they are overdue and not return has been rec'd?

    I can feel myself slooooowly sinking!

    Thanks again in anticipation

    Nicky

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Sorry I got the > the wrong way round, all you need to do is click on L2, go to Format - Conditional Formatting and in the formula change the symbol to < then press OK, then with L2 still selected click on the Paint Brush icon and "brush" over L3:L17, This applies the same formatting to the other cells.

  12. #12
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8

    Smile

    Oh my gosh - you are wonderful Old Chippy - did as you said and it works like a dream.

    And I have to give a mention to the also wonderful NBVC because while looking at his original answer to my post, I realised that I had used his suggested formula literally as written ie. with the 2 '>>' s at the beginning of formula. I tried again omitting these, and his formula also worked fantastically!

    Sorry to have wasted your time duplicating work, but I did say I was perfectly useless... or did I?!?

    Anyway, thank you both VERY much for your time with this - I may be useless, but I'm very greatful.

    I'd like to say thanks also for the links to the help websites, I'm sure they will be invaluable with future projects.

    Thanks once again,

    Regards,

    Nicky

  13. #13
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    You may find this one useful also, there is a video here to watch

    http://www.contextures.com/xlCondFormat01.html

    http://www.datapigtechnologies.com/ExcelMain.htm

  14. #14
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8

    Thumbs up

    Thanks Old Chippy, all suggestions for learning greatly appreciated.

    Just realised my gaff in my last post ...... NBVC might not be a 'he' - not bothered one way or the other, the thanks still apply loads.

    Regards, Nicky

  15. #15
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    NBVC might not be a 'he'
    I wonder sometimes myself, but he's definitely an HE - don't tell him I told you

  16. #16
    Registered User
    Join Date
    07-22-2008
    Location
    YORKSHIRE
    Posts
    8
    tee hee! thanks again

    Nicky

+ 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