ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   editing strings (https://www.excelbanter.com/excel-programming/319900-editing-strings.html)

Himszy

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



Jim Thomlinson[_3_]

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

HTH

"Himszy" wrote:

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




Bob Umlas

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?





Tom Ogilvy

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?






All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com