+ Reply to Thread
Results 1 to 7 of 7

matching date problem

  1. #1
    Registered User
    Join Date
    05-28-2009
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    matching date problem

    Please Login or Register  to view this content.
    The problem is cannot find "sn"~~
    tdate is a date, e.g. "2009/6/23"
    the format of field is shown as followings,
    r2.Columns(1) : EM001
    r2.Columns(4) : 2006/9/1
    I checked many times~~The problem is the same..
    Please help me to solve it~thank you
    Last edited by thy00123; 07-03-2009 at 05:14 AM.

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

    Re: matching date problem

    Try using the Long equiv. of your Date in the Match, ie:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-28-2009
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: matching date problem

    Quote Originally Posted by DonkeyOte View Post
    Try using the Long equiv. of your Date in the Match, ie:

    Please Login or Register  to view this content.
    This method cannot solve this problem~~but thanks for your reply

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

    Re: matching date problem

    Post a sample file in which your issue can be replicated.

  5. #5
    Registered User
    Join Date
    05-28-2009
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: matching date problem

    Quote Originally Posted by DonkeyOte View Post
    Post a sample file in which your issue can be replicated.
    I have uploaded the sample program~~

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

    Re: matching date problem

    OK, well your first problem is that in the vba file your date values are datetime stamps whereas in your lookup file they are seemingly only date values (no time) in which case you need to revise tdate:

    Please Login or Register  to view this content.
    then in the Match convert tdate to Long as advised previously

    Please Login or Register  to view this content.
    What do you want to do should the Index/Mail fail as will be the case with the 2nd date in the VBA File ...

  7. #7
    Registered User
    Join Date
    05-28-2009
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: matching date problem

    Quote Originally Posted by DonkeyOte View Post
    OK, well your first problem is that in the vba file your date values are datetime stamps whereas in your lookup file they are seemingly only date values (no time) in which case you need to revise tdate:

    Please Login or Register  to view this content.
    then in the Match convert tdate to Long as advised previously

    Please Login or Register  to view this content.
    What do you want to do should the Index/Mail fail as will be the case with the 2nd date in the VBA File ...
    I have tried that method, it can solve my problem~~thanks~~
    Moreover, using "datevalue" also can solve it~~

+ 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