LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Remove the right most 3 characters from a string

I'm using a loop to build a string of characters but I'm getting extra
characters at the end that I don't want. Is there a function like trimend or
regexp where I can take the string and remove the right most 3 characters?

Here's an example:

arraystring = "someword", "someword2", "someword3", "someword4", "

I'd like it to change my arraystring to show just:

"someword", "someword2", "someword3", "someword4"

This doesn't seem to work for me:
ArrayString = Trim(ArrayString, Right(Len(ArrayString) - 3))

I'm getting an error under the right() function.
 
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
Remove characters from string Niek Otten Excel Programming 12 January 29th 07 04:37 AM
Remove characters from string Ron Rosenfeld Excel Programming 3 January 28th 07 03:20 PM
Remove characters from string Helmut Weber[_2_] Excel Programming 2 January 28th 07 11:36 AM
Remove characters from string Zack Barresse Excel Programming 1 January 28th 07 07:52 AM
Remove all characters following the first character in a string RC Excel Discussion (Misc queries) 5 August 30th 05 03:17 AM


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