Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default I found a bug

In a production workbook (Excel 2002) I have the users enter the effective
date on a user form. I use the IsDate function to be sure it is valid. I
then place the date into a locked cell on a sheet. The IsDate function says
that 10/9/007 is a valid date. But on the sheet Excel treats it as a
string. So of course all calculations throughout turn to #ERROR. Does this
bug still exist in later versions?

Don <www.donwiss.com (e-mail link at home page bottom).
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default I found a bug

Hi Don,

Not a bug. IsDate only determines if an expression can be converted to a
date.
(See help under isdate)

Use something like this:- Range("A1") = DateValue(Yourdate)
where yourdate is a string expression.

Regards,

OssieMac



"Don Wiss" wrote:

In a production workbook (Excel 2002) I have the users enter the effective
date on a user form. I use the IsDate function to be sure it is valid. I
then place the date into a locked cell on a sheet. The IsDate function says
that 10/9/007 is a valid date. But on the sheet Excel treats it as a
string. So of course all calculations throughout turn to #ERROR. Does this
bug still exist in later versions?

Don <www.donwiss.com (e-mail link at home page bottom).

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default I found a bug

Don,

I don't know if that bug still exists in later versions, but the way to
handle that is to use DateValue:

Dim myS As String
myS = "10/9/007"

MsgBox IsDate(myS)
Cells(1, 1).Value = myS
Cells(2, 1).Value = DateValue(myS)

HTH,
Bernie
MS Excel MVP


"Don Wiss" wrote in message
...
In a production workbook (Excel 2002) I have the users enter the effective
date on a user form. I use the IsDate function to be sure it is valid. I
then place the date into a locked cell on a sheet. The IsDate function
says
that 10/9/007 is a valid date. But on the sheet Excel treats it as a
string. So of course all calculations throughout turn to #ERROR. Does this
bug still exist in later versions?

Don <www.donwiss.com (e-mail link at home page bottom).



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup not found BadgerDave Excel Worksheet Functions 1 April 11th 06 03:29 PM
Macro cannot be found Barney Excel Discussion (Misc queries) 2 April 4th 06 01:21 PM
IF NOT FOUND roy.okinawa Excel Worksheet Functions 5 November 17th 05 03:26 AM
not found Nathan[_4_] Excel Programming 1 June 25th 04 05:26 AM
File not Found ! Alan Excel Programming 1 April 30th 04 06:38 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"