Stefan vd Kerkhof
New Member
- Joined
- Jan 31, 2017
- Messages
- 3
Hello everyone,
I'm running this code to convert a range of columns (from personal.xlsb). The reason for using this code is that it only converts numbers to text and doesn't change for example dates.
It works but there has to be another way to let the code loop or run until the last filled column (row 1 always contains data) i think.
Can you help a new guy out?
Thanks a lot!!
Fragment of code:
I'm running this code to convert a range of columns (from personal.xlsb). The reason for using this code is that it only converts numbers to text and doesn't change for example dates.
It works but there has to be another way to let the code loop or run until the last filled column (row 1 always contains data) i think.
Can you help a new guy out?
Thanks a lot!!
Fragment of code:
Code:
Sub Converteer_getal_2()
'
' getal_converter Macro
' tekstnaargetallen Macro
Application.CutCopyMode = False
ActiveSheet.Columns(1).TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
ActiveSheet.Columns(2).TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
ActiveSheet.Columns(3).TextToColumns Destination:=Range("c1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
ActiveSheet.Columns(4).TextToColumns Destination:=Range("d1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True