=IF(test,true,false) only ever returns "true"?
"Harlan Grove" wrote in message
...
"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".
That makes it even better. As long as the number format is mddyyyy or
mmddyyyy:
=--TEXT(B4,"00\/00\/0000")
--
Biff
Microsoft Excel MVP
|