L
Legacy 477460
Guest
I have a list of data with multiple IP addresses in a single cell.
I use the following VBA code to split the IPs into separate cells.
For Example,
gets converted into,
However, when I run the code again, it also splits each IP into separate numbers.
For example,
gets converted into,
I know that this can be done using simple excel function.
However, I need VBA code for a larger task of which this is just one step.
So can someone please help me with preventing the splitting of period (full stop)?
I do not see period (full stop) being used as a delimiter in the code.
So why is it splitting it at the periods?
I use the following VBA code to split the IPs into separate cells.
For Example,
10.10.33.187 10.10.48.6 10.10.33.188 |
10.56.100.77 172.22.210.253 |
172.22.210.3 172.22.210.6 172.22.210.7 172.22.210.8 |
gets converted into,
10.10.33.187 | 10.10.48.6 | 10.10.33.188 | |
10.56.100.77 | 172.22.210.253 | ||
172.22.210.3 | 172.22.210.6 | 172.22.210.7 | 172.22.210.8 |
However, when I run the code again, it also splits each IP into separate numbers.
For example,
10.10.33.187 |
gets converted into,
10 | 10 | 3 | 187 |
I know that this can be done using simple excel function.
However, I need VBA code for a larger task of which this is just one step.
So can someone please help me with preventing the splitting of period (full stop)?
I do not see period (full stop) being used as a delimiter in the code.
So why is it splitting it at the periods?
VBA Code:
Sheets("Hosts").Activate
Columns("A:A").Select
Application.CutCopyMode = False
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=True