View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Carim Carim is offline
external usenet poster
 
Posts: 510
Default Changing one cell colour by inserting date in another cell

Hi,

A quick but not ideal way would be, to have your formula replaced by :
=IF(isnumber(A1),1,0)

But ideally, it would be better to have the formula
=IF(isdate(A1),1,0)
and add in one of your modules :

Function IsDate(Var As Variant) As Boolean
' from Chip Pearson
IsDate = VBA.IsDate(Var)
End Function


HTH
Cheers
Carim