Hi all,
I'm a VBA newbie, I wrote the vba below and it works, but I loose the leading zeros as well as zeros after decimals whenever the string contains any numbers. I need to keep the zeros because they are ICD9 codes. I have hundreds of tables like this, so it is not feasible to use the inbuilt Text To Column function. I use excel 2010. Can anyone help??
Sub Text2Columns()
Selection.TextToColumns _
Destination:=Range("B1"), _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, _
Semicolon:=False, _
Comma:=True, _
Space:=False, _
Other:=True, _
OtherChar:="-"
End Sub
Thnaks a lot,
SK
I'm a VBA newbie, I wrote the vba below and it works, but I loose the leading zeros as well as zeros after decimals whenever the string contains any numbers. I need to keep the zeros because they are ICD9 codes. I have hundreds of tables like this, so it is not feasible to use the inbuilt Text To Column function. I use excel 2010. Can anyone help??
Sub Text2Columns()
Selection.TextToColumns _
Destination:=Range("B1"), _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, _
Semicolon:=False, _
Comma:=True, _
Space:=False, _
Other:=True, _
OtherChar:="-"
End Sub
Thnaks a lot,
SK