+ Reply to Thread
Results 1 to 5 of 5

Finding a Date in Forumla via VBA

  1. #1
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007; Excel 2010
    Posts
    178

    Finding a Date in Forumla via VBA

    Hi,

    I am having difficulty trying to find a date using VBA.

    I have a date range like so.

    Cell C5 =01/01/2012
    Cell D5 =C5+1
    Cell E5 = D5+1
    Cell F5 = E5+1

    Formatted as dd (day date only)

    Which gives me the dates ok

    When try to use find function in vba it just doesn't find any dates
    This is what I have
    Please Login or Register  to view this content.
    rngDate always end up with nothing

    How do I go about the correct way?

    Thanks
    Last edited by Foreverlearning; 07-23-2012 at 05:28 PM.

  2. #2
    Forum Contributor
    Join Date
    03-21-2012
    Location
    Ho Chi Minh city
    MS-Off Ver
    Excel 2003
    Posts
    180

    Re:Refer to the following macro

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007; Excel 2010
    Posts
    178

    Re: Finding a Date in Forumla via VBA

    Hi,

    Sorry, but I am a liitle confused as to what really is happening here.

    But I can see that you have temporary formatted the dates to do a find then refromatted to original

    Can I ask what is the (Randomize: jJ = 9 + Rnd() * 240 \ 1) for?

    That is a bit confusing

    Thanks
    Lionel

  4. #4
    Forum Contributor
    Join Date
    03-21-2012
    Location
    Ho Chi Minh city
    MS-Off Ver
    Excel 2003
    Posts
    180

    Re: Finding a Date in Forumla via VBA

    [C5].value => #1/1/2012#

    In [D2] Add formula =9+INT(240*RAND())

    And {ENTER}

  5. #5
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007; Excel 2010
    Posts
    178

    Re: Finding a Date in Forumla via VBA

    Thanks Sa DQ

    You have given me ideas for an alternative which works well.

    Appreciate your help

+ 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