+ Reply to Thread
Results 1 to 4 of 4

Code help for dates

Hybrid View

  1. #1
    Registered User
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Code help for dates

    Hello, I am hoping someone can help with a quick code for dates:

    What I need IF K(which is a date) is less than or equal to 18months from today's date color code it red

    Also, any ideas where I can find things like this for future reference? Like an ebook to read over? Thanks

  2. #2
    Registered User
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Code help for dates

    Oh, and if possible...what would it be to add IF K is less then 12 months this color with the same code

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Code help for dates

    Hi Learning, welcome to the forum.

    You should use Conditional Formatting for this, not VBA code (macros). See here: http://chandoo.org/wp/2010/01/05/con...rmatting-dates

    The helpful bit on that linked page will actually be in the Excel 2003 section, regarding using formulas as the Conditional Formatting test, as there is no built-in "180 days from now" condition.

  4. #4
    Registered User
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Code help for dates

    Thanks Paul,

    This will take some play with what they have but at least it is something. I just have to figure out what to tell the format that I want...tough to explain.

+ 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