View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mangesh_yadav[_166_] mangesh_yadav[_166_] is offline
external usenet poster
 
Posts: 1
Default Excel macro to add /'s to a cell value.


you might rather want to use

cell.Value = "=date(" & Right(cell.Value, 4) & "," & Left(cell.Value
2) & "," &
mid(cell.Value, 3, 2) & ")"

to convert into date,

or if you want to use your method, it should be
mid(cell.Value, 3, 2) & "/" & Left(cell.Value, 2) & "/"
Right(cell.Value, 4)

or as you require

maybe you might want to put a ' before the entire text to retain th
way you want to use it.

- Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=27585