+ Reply to Thread
Results 1 to 3 of 3

How to test text string to know if it is a date

  1. #1
    Registered User
    Join Date
    10-06-2005
    Posts
    14

    How to test text string to know if it is a date

    I want to make a boolean function (isDate) to test if the text in a cell is a date or a simple text (comments or other)

    How to do that?

    Thanks

    iTarnak

  2. #2
    Gary''s Student
    Guest

    RE: How to test text string to know if it is a date

    Today is your lucky day!! The IsDate() function already exists in VBA.
    --
    Gary's Student


    "itarnak" wrote:

    >
    > I want to make a boolean function (isDate) to test if the text in a cell
    > is a date or a simple text (comments or other)
    >
    > How to do that?
    >
    > Thanks
    >
    > iTarnak
    >
    >
    > --
    > itarnak
    > ------------------------------------------------------------------------
    > itarnak's Profile: http://www.excelforum.com/member.php...o&userid=27865
    > View this thread: http://www.excelforum.com/showthread...hreadid=474094
    >
    >


  3. #3
    Gary''s Student
    Guest

    RE: How to test text string to know if it is a date

    However, if you want to use IsDate on the worksheet (rather than VBA) then
    use a UDF like:

    Function isdt(r As Range) As Boolean
    isdt = IsDate(r)
    End Function
    --
    Gary's Student


    "Gary''s Student" wrote:

    > Today is your lucky day!! The IsDate() function already exists in VBA.
    > --
    > Gary's Student
    >
    >
    > "itarnak" wrote:
    >
    > >
    > > I want to make a boolean function (isDate) to test if the text in a cell
    > > is a date or a simple text (comments or other)
    > >
    > > How to do that?
    > >
    > > Thanks
    > >
    > > iTarnak
    > >
    > >
    > > --
    > > itarnak
    > > ------------------------------------------------------------------------
    > > itarnak's Profile: http://www.excelforum.com/member.php...o&userid=27865
    > > View this thread: http://www.excelforum.com/showthread...hreadid=474094
    > >
    > >


+ 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