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: 6
Default Truncating a cell entry to the last full word

Hi All,

I've searched in this amazing forum and found a forumla to truncate a
cell length: (assuming data is in A2)
=IF(LEN(A2)399,LEFT(A2,399),A2 & REPT(" ",399-LEN(A2)))

I'm trimming down text entries in a large spreadsheet where the
maximum number of characters in a cell has to be under 400.

Just wondering if anybody has any handy tips on truncating the cell as
above, but also cutting it off at the last whole word.

One thought I had was a formula that does the following: (assuming
text data of 399 characters is in A1)
"If last character in A1 is not a blank (space), then delete last
character in A1"

That would eliminate the last character of cell A1 that doesn't end in
a blank (space).

Thereafter it would just be a case of reapplying the formula a few
times until all the characters of a truncated word have been deleted
and the cell ends with a blank (space) and that would mean that the
cell is under 399 characters in length and ends with a blank (space) =
truncation to the last full word.

Does that sound feasible? No need for a macro that repeats the formula
until the cell ends with a blank (space), I can repeat the forumla
manually to have the desired effect.

I would greatly apprecaite any help on this at all,

Thanks in advance,

All the best,

Pat
 
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
Extracting abbreviated days, converting to full word Sneilan Excel Discussion (Misc queries) 4 October 19th 07 04:02 PM
Truncating whole numbers - diplaying thousands instead of full num Reez Excel Discussion (Misc queries) 1 May 7th 07 04:29 PM
truncating data within a cell for an entire column vlapi New Users to Excel 3 April 18th 07 08:15 PM
in one sheet add one word after every entry in every cell. how? Sandy Excel Worksheet Functions 3 December 20th 06 07:04 PM
Link cell is truncating text Mikeice Excel Worksheet Functions 0 August 9th 05 11:58 AM


All times are GMT +1. The time now is 10:06 PM.

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"