+ Reply to Thread
Results 1 to 5 of 5

find date in range

  1. #1
    Registered User
    Join Date
    10-03-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    find date in range

    I have a macro for a fitness worksheet but everytime I run the macro it fails when searching for a date. It works by searching the date entered by the user against range "G4:L100" then will paste the user values below that date. Here is the code for the searching and copying of the cells: The different font is where I believe the problem is.

    Please Login or Register  to view this content.
    The date is entered as dd/mm/yyyy, then searched as a string but the macro will not find the date.

    Is this code correct? Or is something missing. Thank you for your help in advance.
    Last edited by Leith Ross; 10-03-2009 at 11:33 PM. Reason: Added Code Tags

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    re: find date in range

    This seemed to work for me, if it doesnt't work for you please supply a workbook so we can see what its supposed to be doing!
    Please Login or Register  to view this content.
    Not all forums are the same - seek and you shall find

  3. #3
    Registered User
    Join Date
    10-03-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    re: find date in range

    I found this on the web and have tried to get it working but I do not know enough code to understand why it won't find the date. Thank you for your help and quick response.
    Attached Files Attached Files

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

    re: find date in range

    In your sample file the date entered in B28 is 4th October 2009 - this is not within the date values of the table to the right - ie it would appear to be a date entry issue (using correct entry format)

  5. #5
    Registered User
    Join Date
    10-03-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: find date in range

    It will work with the first date, 04/10/2009. If you try any of the other values in the right side table the final part of the module will tell you the date you entered is not found. If you change the date to the number format to make sure the values are the same it will still not find the date.

+ 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