Results 1 to 1 of 1

Excel not recognizing dates in correct order.

Threaded View

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    1

    Excel not recognizing dates in correct order.

    Hello everyone,

    I have used the wonderful tips from this forum for several years, but this is my first post; so please let me know if I have inadvertently stepped outside of any of the guidelines.

    I have a workbook (attached) in which I am attempting to test a date on a user form against a series of date ranges on a worksheet. Once a valid date range is found, additional tests are performed and if certain conditions are met, a cell value on the row in question is changed. If the additional conditions are not met, then it compares the form date to the next date range on the sheet. (this will probably be much clearer by reading the module itself). I currently have these additional tests 'disabled' ("commented out") in order to try and isolate the date issue (the other tests are working correctly so far on their own). I am testing to see which date ranges excel finds applicable using a message box.

    There are essentially two issues I am having:

    1) For some reason, Excel seems to "think" that 10/15/12 comes before 10/11/12, 10/12/12, 10/13/12, 10/14/12, and 10/15/12; dates 10/10/12 and prior do not seem to cause this issue.

    2) The code is only recognizing the date that I have defaulting into the user form (current date), and does not seem to recognize any dates that are typed in by hand - even though I am forcing the date format.

    I have checked the date format on both the user form and the worksheet, thinking that that may be the problem, but they seem to be the same.

    Worksheet = Sheet_Sales (Start Date = column B; End Date = column G)
    Module = Module 6
    Form = frmCheckIn
    The module can be run/tested by running the form, selecting client "Harper-Jackson" from the client drop-down, Yoga from the item drop-down, and pressing the commandbutton2 button.

    I have been struggling with this one for a few days now and think I have lost my mind (unless someone changed the calendar and didn't tell me ).

    If anyone can see what I've done wrong or missed and perhaps help me to correct it, I will be eternally grateful, as this date/cell population issue is the last "technical" item preventing me from completing this project.

    Thank you in advance for your time.

    Best,
    Mandy
    Attached Files Attached Files

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