+ Reply to Thread
Results 1 to 22 of 22

Change cell colour based on delivery date

  1. #1
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Change cell colour based on delivery date

    Hi,

    I am trying to write a formula that changes the cell colour if a delivery date has past. Is there a way of doing this? If no value is present in column B and the delivery date has past I would like the cell to turn red.

    A B
    Delivery Date Delivered Date
    06/03/2012 05/03/2012
    06/03/2012
    Last edited by gtudor; 03-21-2012 at 09:20 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Change cell colour based on delivery date

    Do you consider the 6/3/2012 to be passed today?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Change cell colour based on delivery date

    Hi

    Try this,in Conditional Formatting rules.

    =B1<TODAY()

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    No, 07/03/2012 would be considered to be past / late.

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Change cell colour based on delivery date

    Assuming the delivery dates start in A2 select from A2 down your range that you want to apply this to and in conditional format choose Formula Is and use: =AND(B2="",A2<TODAY()) and then set your format.

    Dom

  6. #6
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    I cant seem to get this to work.

    I have included the actual sheet to assist. I would like cells in column F to change to red if a delivery date has passed but not to change to red if there has been a confirmed delivery in column H.

    For some reason I just cannot get this to work.Capture.JPG

  7. #7
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Change cell colour based on delivery date

    Select F11:F15 (or as far as you want to go) and in conditional formatting use Formula Is: =AND(H11="",F11<TODAY()) and set your format.

    Dom

  8. #8
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    Following on from this post, is there a way to change a cells colour if a delivery date is within 7 days from todays date?

  9. #9
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Change cell colour based on delivery date

    One way is create a rule =(TEXT(A1-TODAY(),"D"))>=7

    or

    =(DAY(TODAY())-DAY(A1))>=7

    Then pick a colour to format the cells.
    Last edited by darknation144; 03-20-2012 at 10:09 AM.

  10. #10
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    Quote Originally Posted by darknation144 View Post
    One way is create a rule =(TEXT(A1-TODAY(),"D"))>=7

    or

    =(DAY(TODAY())-DAY(A1))>=7

    Then pick a colour to format the cells.
    Is this done within conditional formatting?

  11. #11
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Change cell colour based on delivery date

    Yes go to conditional and enter them as a new rule.

    Home Tab > Conditional Formatting > New Rule > Use formula to determine which cells to format.

  12. #12
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    Not worked. Column V is where I would like to apply the formula. Any advice?

    Capture.jpg

  13. #13
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Change cell colour based on delivery date

    Sorry should be the other way round for your needs =(DAY(A1)-DAY(TODAY()))<=7
    Last edited by darknation144; 03-20-2012 at 12:18 PM.

  14. #14
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    Still no luck. I am changing the cell location to V12 but cannot seem to get this one working

  15. #15
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Change cell colour based on delivery date

    ...A sample workbook, maybe??

  16. #16
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    Sample workbook attached.

    I would like the cells in column J to change to amber if they are due within 7 days via conditoinal formatting?Sample 2.xlsx

  17. #17
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Change cell colour based on delivery date

    ...Take a look to the example..
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    It has worked up to a point. Blank cells also change to yellow, is there a work around to keep them white until a date is entered?

  19. #19
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Change cell colour based on delivery date

    Yes there is..
    Attached Files Attached Files

  20. #20
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Change cell colour based on delivery date

    Fantastic, thanks.

  21. #21
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Change cell colour based on delivery date

    You are welcome

  22. #22
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Change cell colour based on delivery date

    Time passed.xls

    As you can see the formula highlights ones within 7 days of today.

+ 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