+ Reply to Thread
Results 1 to 5 of 5

Need Macro Date Help not based on Today's Date

  1. #1
    Registered User
    Join Date
    05-18-2011
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Need Macro Date Help not based on Today's Date

    Please help - been struggling for awhile. I need cell F16 to change RED when cell D16 (a date) has been 14 days past due. When it is 7 days before due I need it to be Amber color. I would prefer a macro if possible.

    Also I would like it to reference cells accordingly. So then cell F17 would change to RED when cell D17 (a date entered) has been 14 days past due. Thank you for your help!!

    In the image I need the GREEN cell to be RED after 14 days from the date in the Cell with 21-Oct-10 in it
    Attached Images Attached Images
    Last edited by Sally_Shell; 05-18-2011 at 07:31 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Macro Date Help not based on Today's Date

    Hi,

    Any particular reason why you need a macro? A standard conditional format will do what you want.

    Always use standard Excel functionality where possible since it's always quicker than a macro and usually simpler and quicker to create.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Need Macro Date Help not based on Today's Date

    here is a simple macro that does what you want, I think. The only question I have is about your title stating "not based on today's date". So it is based on what date then? Where is it?

    Look at the macro, and I'm sure you'll be able to change the NOW() funtion with the proper reference to the reference date you need.

    regards
    Pierre
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-18-2011
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need Macro Date Help not based on Today's Date

    Hello and thank you for replying. I am sorry I was not clear. It is based on a date entered into a Cell. It is all based on tracking samples. I want cell F16 to change RED when cell D16 (10-10-2010) has been 14 days past due. Then cell F17 to change RED when cell D17 (11-15-2010) has been 14 days past due and so...I dont understand what conditional format to use? And how to apply it to all columns so that it references the the correct row? THANK YOU AGAIN!! I just thought a macro would be easier??

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Need Macro Date Help not based on Today's Date

    I've put in cell I1 the reference date and I gave it a named range "Date_ref"
    Macro is called Test_D.
    Hope this help
    Pierre
    Attached Files Attached Files

+ 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