View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default =IF(test,true,false) only ever returns "true"?

"T. Valko" wrote...
....
Try this:

=--TEXT(IF(LEN(B4)=7,"0"&B4,B4),"00\/00\/0000")


Prepending 0 unnecessary.

TEXT("1232009","00\/00\/0000") and TEXT("01232009","00\/00\/0000")
both return "01/23/2009".