convert cell A1 to A2 - MM/DD/YY to MMDDYY

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Mid doesn't allow stringing each of the 2 char fields
together as an answer.
cell A1 has 03/17/04 and would like A2 to have 031704.
Macro coding please. Thank you ahead of time.
 
Hi
if your existing value is a string 8and not a date) use
=SUBSTITUTE(A1,"/","")

if it is stored as a date (which would be better) just change the
format of this cell to the custom format
MMDDYY
 
I got this coded in my macro, but the activecell line goes
yellow as an error.. what looks wrong?

Range("K2").Select
Selection.Copy
Range("K3").Select
ActiveSheet.Paste

ActiveCell.Formula = "=Substitute(K3, " / ", "")"
 
On the money! Thanks Frank.
-----Original Message-----
Hi
if you need code try

ActiveCell.value = Replace(Activecell.value,"/","")

--
Regards
Frank Kabel
Frankfurt, Germany



.
 
Back
Top