View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default Split field based on number of characters and space

This gives the left side of the text =LEFT(A1,MIN(30,IF(ISERROR(FIND("
",A1)),30,FIND(" ",A1))))
This gives the right =RIGHT(A1,MIN(30,LEN(A1)-IF(ISERROR(FIND("
",A1)),30,FIND(" ",A1))))
Have done a bit of testing but 'caveat emptor'
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"william_mailer"
<william_mailer.22x0p0_1139409935.9838@excelforu m-nospam.com wrote in
message news:william_mailer.22x0p0_1139409935.9838@excelfo rum-nospam.com...

I have a string of text in a cell. I want to split the cell based on
anything over 30 characters. But I want to also split on a space. So
basically the first space before I reach 30 characters limit. Hope I
explained well !! Any help would be great !

Thanks


--
william_mailer
------------------------------------------------------------------------
william_mailer's Profile:
http://www.excelforum.com/member.php...o&userid=31318
View this thread: http://www.excelforum.com/showthread...hreadid=510058