Re: $$Excel-Macros$$ Excel VBA Question: Splitting a String based on a Parameter and outputting it into cells

2012-08-06 Thread pesh
This works great! Thank you! On Sunday, August 5, 2012 9:09:06 AM UTC-4, Don Guillett wrote: Or Sub SplitStringSAS() Dim VarArr With Selection VarArr = Split(.Value, |) .Resize(1, UBound(VarArr)).Value = VarArr End With End Sub Don Guillett Microsoft Excel Developer SalesAid

Re: $$Excel-Macros$$ Excel VBA Question: Splitting a String based on a Parameter and outputting it into cells

2012-08-05 Thread dguillett1
I just recorded this TTC for datatext to columnsdelimitedother=| Sub Macro12() ' ' Macro12 Macro ' Macro recorded 8/5/2012 by Donald B. Guillett ' ' Selection.TextToColumns Destination:=Range(J6), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True,

Re: $$Excel-Macros$$ Excel VBA Question: Splitting a String based on a Parameter and outputting it into cells

2012-08-05 Thread dguillett1
Or Sub SplitStringSAS() Dim VarArr With Selection VarArr = Split(.Value, |) .Resize(1, UBound(VarArr)).Value = VarArr End With End Sub Don Guillett Microsoft Excel Developer SalesAid Software dguille...@gmail.com From: Rajan_Verma Sent: Sunday, August 05, 2012 12:48 AM To:

RE: $$Excel-Macros$$ Excel VBA Question: Splitting a String based on a Parameter and outputting it into cells

2012-08-04 Thread Rajan_Verma
Hi Use this : Sub SplitString() Dim StrString As String Dim VarArr StrString = | ABC:2013| ABCD| EFGH|2IJK | 3243| 9s9s| afjkdf| StrString = Mid(StrString, 2, Len(StrString) - 2) VarArr = Split(StrString, |) Range(A1).Resize(1, UBound(VarArr)).Value = VarArr