PDA

View Full Version : [SOLVED:] Splitting the content of a cell based on special characters



bydo
07-31-2014, 07:07 AM
Hi guys,

I need help splitting the content of cells onto several columns based on special characters.
Please look at my file attachment, sheet("before") is the data I got, sheet ("after") is the
data I need.

Is this even possible by using vba only?

Hope you guys can help, I'm pretty desperate....

p45cal
07-31-2014, 09:10 AM
try: (works on the active sheet)
Sub blah()
Range("A1").CurrentRegion.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, Other:=True, OtherChar:="|"
End Sub

bydo
08-01-2014, 03:52 AM
Thank you, worked like a charm! I totally forgot the Text to column feature...