The following Macros works fine and it gets the month and year as I intended. But then I have to apply format to the new column to get my date in 2010-10 format (yyyy-mm).
Can some one suggest me how to modify this code so that cell(a,16) are also formatted to yyyy-mm?
Sub Go()
Dim a As Long, x As Long
x = Cells(Rows.Count, 15).End(xlUp).Row
For a = 2 To x + 1
Cells(a, 16) = Left((Left(Cells(a, 15), 3) & " " & Right(Cells(a, 15), 26)), 9)
Next a
End Sub
Can some one suggest me how to modify this code so that cell(a,16) are also formatted to yyyy-mm?
Sub Go()
Dim a As Long, x As Long
x = Cells(Rows.Count, 15).End(xlUp).Row
For a = 2 To x + 1
Cells(a, 16) = Left((Left(Cells(a, 15), 3) & " " & Right(Cells(a, 15), 26)), 9)
Next a
End Sub