View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Splitting text in cells.

On Mon, 14 Jan 2008 00:22:22 -0500, Ron Rosenfeld
wrote:

On Sun, 13 Jan 2008 23:58:31 -0500, Ron Rosenfeld
wrote:

sPat = "\s?((\S[\s\S]{1," & MaxLength - 2 _
& "}\S)|(\S[\s\S]{" & MaxLength + 1 _
& ",}?\S))(\s|$)"



TYPO ALERT! SHOULD READ:

sPat = "\s?((\S[\s\S]{1," & MaxLength - 2 _
& "}\S)|(\S[\s\S]{" & MaxLength - 1 _
& ",}?\S))(\s|$)"
--ron


One further edit:

sPat = "((\S[\s\S]{1," & MaxLength - 2 _
& "}\S)|(\S[\s\S]{" & MaxLength - 1 _
& ",}?\S))(\s|$)"

--ron