+ Reply to Thread
Results 1 to 9 of 9

Mark if between dates

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Mark if between dates

    Hi,
    I need code that will mark column "AN" as "Quote Required" if the dates between A - N are less then 12 years but more than 4 years, I have added an additional page showing the outcome in the example attached.
    Many Thanks
    Johnny
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Mark if between dates

    Hello Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: Mark if between dates

    Why not a formula like this in AN2?

    =IF(AND(YEAR(A2)-YEAR(N2)<12,YEAR(A2)-YEAR(N2)>4),"Quote Required","")
    Teach me Excel VBA

  4. #4
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Mark if between dates

    Quote Originally Posted by YasserKhalil View Post
    Hello Try this code
    Please Login or Register  to view this content.
    Works great, I have just worked out that I need the background of the call coloured blue, Is this also possible?

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Mark if between dates

    Yes it is possible
    Just try edit this line to add a line for that task
    Please Login or Register  to view this content.
    To
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Mark if between dates

    Sorry just run across another problem - From time to time the date cells will contain " / / " is it possible to skip when this is the case?

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Mark if between dates

    May be
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Mark if between dates

    For some reason it is picking up the " / /" is there code that will ignore if a date is not inputted?

  9. #9
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Mark if between dates

    May be before this line
    Please Login or Register  to view this content.
    You can add a condition of checking date using IsDate function

+ 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. Conditional Formatting to Mark Dates on a Calendar
    By HarryGreenwood in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-15-2015, 01:57 AM
  2. [SOLVED] I cannot automatic - mark with colour a set dates
    By jpol in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 02-04-2013, 04:46 AM
  3. Mark data from one sheet to another,and then mark dublicate
    By minotauro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2012, 07:58 AM
  4. Replies: 3
    Last Post: 02-09-2012, 06:57 PM
  5. Quatation mark or single mark in sql query
    By Snoopy2003 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2010, 06:03 PM
  6. Mark dates
    By excelkeechak in forum Excel General
    Replies: 4
    Last Post: 11-24-2009, 09:33 PM
  7. Mark all dates that are 1 year or less with VBA
    By curbster in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-23-2009, 08:45 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