ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to test text string to know if it is a date (https://www.excelbanter.com/excel-programming/342172-how-test-text-string-know-if-date.html)

itarnak[_4_]

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 cel
is a date or a simple text (comments or other)

How to do that?

Thanks

iTarna

--
itarna
-----------------------------------------------------------------------
itarnak's Profile: http://www.excelforum.com/member.php...fo&userid=2786
View this thread: http://www.excelforum.com/showthread.php?threadid=47409


Gary''s Student

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



Gary''s Student

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




All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com