View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Splitting text in cell with Excel 97 VBA macro

Hi Vsevolod,

For your purposes (xl97), try a function from Tom Ogilvy:

Function Split97(sStr As Variant, sdelim As String) _
As Variant
Split97 = Evaluate("{""" & _
Application.Substitute(sStr, sdelim, """,""") _
& """}")
End Function

---
Regards,
Norman


"Vsevolod" wrote in message
m...
Hi!

Can somebody help me in the next problem:

I need to transform (split) a sample text in a cell into N-row table
(or array) where N is equal to number of words in the text. Separators
may be "," or ", ". How can I do that with VBA in Excel 97 (only!)?