I have the following code
sub test()
string2 = "2/13 12L, Hill Forts Henry[9/2F]11-8"
Dim position As String
position = Trim(Left(Trim(string2), InStr(1, Trim(string2), " ", vbTextCompare)))
MsgBox (position)
Range("a1").Value = position
End sub
This should output 2/13 into cell a1 but excel converts it to a date 13-Feb
Is there a way to stop this happening?
Thanks,
os
sub test()
string2 = "2/13 12L, Hill Forts Henry[9/2F]11-8"
Dim position As String
position = Trim(Left(Trim(string2), InStr(1, Trim(string2), " ", vbTextCompare)))
MsgBox (position)
Range("a1").Value = position
End sub
This should output 2/13 into cell a1 but excel converts it to a date 13-Feb
Is there a way to stop this happening?
Thanks,
os