+ Reply to Thread
Results 1 to 4 of 4

Looping though a list of dates

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    San Francisco, USA
    MS-Off Ver
    Excel 2007
    Posts
    60

    Looping though a list of dates

    Lets say I have the following list of dates (in date format, not strings)

    6/13/2012
    7/12/2012
    6/18/2012

    I want to loop through and if the date contains the month of june and the year 2012, I then want to do something.

    What would be the code for this? Many thanks

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Looping though a list of dates

    Are these the only 2 parameters or are there a list of conditions to be fulfilled?

    What should the action taken if it finds the month and year?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    04-24-2012
    Location
    San Francisco, USA
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Looping though a list of dates

    Hi Arlu1201
    yes these are the only parameters?

    The action taken will be to simply highlight in yellow all the dates with June 2012 in them. There are 1000s of dates in this list.

    Many thanks

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Looping though a list of dates

    Assuming the dates are in column A

    Please Login or Register  to view this content.

+ 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