View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Dennis Allen Dennis Allen is offline
external usenet poster
 
Posts: 43
Default Date cell format

Well, the problem is a cell referencing another cell, of type date, displaying 1/0/1900. I could use IF(B33<0,B33,""), but then
other cells would have to test for either a date or a string. To avoid the whole mess, I'll just create a hidden column for the
date and the displayed column will do the IF() test...Dennis

"Tom Ogilvy" wrote in message ...
Excel evaluates all the conditions.

I can't see the whole thread, so I don't know the specifics, but you can use
isdate to see if a value can be interpreted as a date.

Excel has a typeof construct

if type of object1 is object2 Then

there is also vartype

But for most tests, a date is a number, so there is no way to differentiate
a number from a date for the most part.

--
Regards,
Tom Ogilvy

"Dennis Allen" wrote in message
...
"mangesh_yadav " wrote in

message ...
just use another if conditiion to check if D5 has a date or a "", and
accordingly set the value.



How?

Two question come to mind. One, does excel have a function to determine a

cell's type, be it date or text? In JavaScript you have
typeof().

Two, does excel stop conditional testing? In Javascript, if you have if

(typeof(a)=="string" & a < "g"), if the variable 'a' is
numeric you never see a < "g" executed...Dennis