+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Vba array to check today date against specific dates and day of week

  1. #1
    Registered User
    Join Date
    12-24-2010
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    89

    Vba array to check today date against specific dates and day of week

    Howdy,

    In Sheet1, A2-A84 I have a list of dates that needs to be checked against today's date, if today's date matches a given date then need to check if today is a Sunday then if Sunday, let's say C2.Value would = whatever matched date " is a Sunday". If it is not Sunday then D2.Value = 'some other msg

    I did something similar with checking todays date against a range of other dates, but in that instance there were only 6 date ranges and I used If Then ElseIf to check.

    I'm thinking with 83 dates to check it may be wise to use a vba code (preferably) to load A2 - A84 into an array and then do the checking.

    As a newbie to vba I have no idea as to how to set up the code, so any help, as always, would be greatly appreciated.


    Thanks,

    George

    +++++++++++++++++

    Sorry about breaking a rule.

    I've also posed the question on MrExcel.com, the link is as follows:

    http://www.mrexcel.com/forum/showthread.php?t=525642
    Attached Files Attached Files
    Last edited by BigGPL; 02-02-2011 at 06:48 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Vba array to check today date against specific dates and day of week

    Your post does not comply with Rule 8 of our Forum RULES.

    Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere.

    We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this

  3. #3
    Registered User
    Join Date
    12-24-2010
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Vba array to check today date against specific dates and day of week

    Okay, after much trial and error, and error, and error, etc. I got the basics of what I need;

    Please Login or Register  to view this content.
    Also posted at MrExcel:
    http://www.mrexcel.com/forum/showthr...77#post2597477
    Last edited by BigGPL; 02-02-2011 at 06:53 AM.

+ 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