Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Truncating a string in Excel

Hi
If you always have a "-" character before the text bit and your text is
in A2 then try

=Trim(RIGHT(A2,LEN(A2)-FIND("-",A2)))

This finds the postion of the "-", subtracts it from the length of the
text (so that is the length of the word you want), then extracts that
much text from the right hand side of the whole string. The trim deals
with any blank space lying about.
regards
Paul

Reply
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
Why is Excel truncating my text to 255 characters? Mailjust4me Excel Discussion (Misc queries) 1 May 7th 10 07:38 AM
Trimming/Truncating Text Field in Excel billbrandi Excel Discussion (Misc queries) 3 August 3rd 08 05:29 AM
Truncating a text string bob Excel Worksheet Functions 3 December 20th 05 08:01 PM
Truncating a text string gavin Excel Discussion (Misc queries) 7 May 11th 05 12:21 AM
excel truncating leading zeros Veena Excel Programming 1 September 27th 04 06:43 PM


All times are GMT +1. The time now is 12:36 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"