Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default editing strings

How do I remove the last three letters of a string?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default editing strings

strMyString = left(trim(strOldstring)), len(trim(strOldstring))-3)

HTH

"Himszy" wrote:

How do I remove the last three letters of a string?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 301
Default editing strings

Since this is in the Programming section, I assume you want to use VBA. You
can use
MyString=Left(MyString,Len(MyString)-3)


Bob Umlas
Excel MVP
"Himszy" wrote in message
. ..
How do I remove the last three letters of a string?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default editing strings

sStr = "abcdefgh"
sStr = Left(sStr,len(sStr)-3)

--
Regards,
Tom Ogilvy

"Himszy" wrote in message
. ..
How do I remove the last three letters of a string?




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
find and replace numeric strings in larger text strings Mr Molio Excel Worksheet Functions 8 November 9th 11 05:17 PM
How to find number of pairs of strings from list of strings? greg_overholt Excel Worksheet Functions 5 January 27th 06 10:42 PM
How can I count strings within strings Paul W Excel Worksheet Functions 4 June 14th 05 12:39 PM
Finding strings within strings Rod[_6_] Excel Programming 1 December 2nd 03 05:34 PM
Finding strings within strings Rod[_6_] Excel Programming 1 December 2nd 03 05:19 PM


All times are GMT +1. The time now is 05:58 AM.

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

About Us

"It's about Microsoft Excel"