JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
I have a column with string values, in which some cells contain non alphanumeric characters, remaining cells contain alphanumeric only.
Does anyone have any VBA code suggestions on how to create two columns from this initial column?
I can only think of the following:
Is there a faster way to achieve this or any code to filter for all non-alphanumeric characters and move those cells in a single pass? Alternatively, if I can filter for cells ONLY containing alphanumerica characters, then that can work too (since the left overs will be non-alphanumeric).
Thanks in advance,
Jack
I have a column with string values, in which some cells contain non alphanumeric characters, remaining cells contain alphanumeric only.
Does anyone have any VBA code suggestions on how to create two columns from this initial column?
I can only think of the following:
Code:
Dim myArray as Variant
myArray = Array("|","\","[","]","/") ' Full array to have characters: _ - ' ; / \ | "[] {} () + = % # $% @ * . ! ?
Dim LR as Long: LR = Range("A" & Rows.Count).End(xlUp).Row
Dim x as Long
For x = 0 to Ubound(myArray)
Columns(1).AutoFilter Field:=1, Criteria1:=myArray(x), operator:=xlFilterValue
' Code to move visible cells elsewhere, then clear filtered results
Next x
Thanks in advance,
Jack