LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default google sheets truncate #characters but full words

Hi,

Hoping some clever people can help out here!

I have a list of sentences, which I need to place in another doc. This other doc can take up to 3 lines of separate text with each line having a set max number of characters.

Is there a way to take the original full sentence and split this over the 1, 2 or 3 lines based on the number of characters which are limited to each line, but only take full words?

For example, one sentence might be:
Ideally the text result should look something like this each line

If the first line in the doc can take a max character limit of 21.
21 characters is:
Ideally the text resu
However, I only want the result to be the full words from that result, so:
Ideally the text

I then want the second line to lead from that. If this second line in the doc can take a max character limit of 15.
The next 15 characters after the previous full word, is (ignoring the start and end spaces):
result should look someth
Again, I only want the result to be the full words from that result, so:
result should look

And the same for the thrid line. If this limit were 18, the letters following on from the previous would be:
something like this each lin
Full words mean the result would need to be:
something like this each

So the final text back would be:

1st line: Ideally the text
2nd line: result should look
3rd line: something like this each

However, if there is a sentence with only 18 chars, we still want the words back. Same goes for sentences that would fulfil 2 lines (21 and 15).



Any help would be greatly appreciated.

Thanks,!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to truncate list of meaningful words greater than 15 chars tomeaningful words of 8 chars. Babloo Excel Worksheet Functions 4 April 29th 11 11:27 PM
Truncate Left Characters in Cell Value Ray Clark[_2_] Excel Programming 4 December 26th 07 11:00 PM
Truncate words [email protected] Excel Worksheet Functions 2 April 12th 06 10:59 PM
Trying to truncate or separate the first 3 characters/digits of co Jim Excel Discussion (Misc queries) 4 January 13th 06 01:51 PM
Truncate last five characters Jesse Hamilton Excel Programming 9 November 11th 03 06:43 PM


All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"