Convert Data type by column

RaunLGoode

Registered User.
Local time
Yesterday, 21:40
Joined
Feb 18, 2004
Messages
122
I need to verify all the values in several columns are Long Integers.
It would seem like this would be a fairly easy thing to do, but I haven't found anything after repeted attempts. I have tried using "Text to columns". but the example below works part of the time and doesn't other times, returning an "Run-time error 13", Type Mismatch.
Could somebody please help?


'Col G Create Date > CreateD
Dim RcolCreateD as string 'fills with column , like "R"
Dim rTopLine as Long 'First Line number after header
Dim rCount ''; Last Line number

Range(RcolCreateD & rTopLine & ":" & RcolCreateD & rCount).Select
Selection.TextToColumns Destination:=Range(RcolCreateD & rTopLine), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
Selection.NumberFormat = "@"
'

This augument is repeted for each column
 

Users who are viewing this thread

Back
Top Bottom