View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
UB UB is offline
external usenet poster
 
Posts: 120
Default Split a text using VBA

Hi Thanks for your help. I works.
Is there a way if I only want to extract "JASON PINTO" & "DAVID WEST" from
this string

"Jacob Skaria" wrote:

Try the below

Dim strData As String, arrData As Variant
strData = "immm_JASON_PINTO_DAVID_WEST_1000011"
arrData = Split(strData, "_")
Range("A2").Resize(1, UBound(arrData) + 1) = arrData

If this post helps click Yes
---------------
Jacob Skaria


"ub" wrote:

Hi
I have a text as follows:
immm_JASON_PINTO_DAVID_WEST_1000011
I want to split the text in different columns using vb code

Please advise