Mr_Ragweed
Board Regular
- Joined
- Dec 10, 2012
- Messages
- 74
Hi all. I'm using excel2010. I've been searching the posts for a solution and everyhting always seems to be in reverse of what i need. I have text strings of varying length and are all unique. All i want to do is keep the first 24 characters and the last 7 characters (=31 so i can name the worksheet tab with the result). It's part of a loop that first replaces all invalid characters, then does a LEN count and removes all spaces anytine LEN>31. The next part of the loop is to recount the character length and anything still over 31 characters edit down in the way i described.
I kinda get the formula version in that =Left(A2, 24) would give me the first 24 and =Right(A2, 7) would give me the last seven. However, thats a formula and not VBA and i'm not good at converting some formulas to VBA. Also i've seen the "MID" function used, again either in formula form or used to retrieve a known length of characters from a string.
I'm sure i'll be embarassed at how simple this solution is. Thanks in advance - this forum has gotten me farther along in my project than i should be.
I kinda get the formula version in that =Left(A2, 24) would give me the first 24 and =Right(A2, 7) would give me the last seven. However, thats a formula and not VBA and i'm not good at converting some formulas to VBA. Also i've seen the "MID" function used, again either in formula form or used to retrieve a known length of characters from a string.
I'm sure i'll be embarassed at how simple this solution is. Thanks in advance - this forum has gotten me farther along in my project than i should be.