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

August,

Use one of the str = formulas below (watch for word wrap)

Dim str As String

str = Left("XCMWTC.MMMTTT.KKKT", 13)
str = Left("XCMWTC.MMMTTT.KKKT", Len("XCMWTC.MMMTTT.KKKT") - 5)

or
Dim str1 as String, str2 as String

str1 = "XCMWTC.MMMTTT.KKKT"
str2 = Left(str1,13)
str3 = Left(str1,Len(str1)-5)

--
sb
"August" wrote in message
...
Hi There,

I am writing vba code in macro, How could I concatenate a
string where I want only the middle text of the string.
Something like this: "This is my string sample,
XCMWTC.MMMTTT.KKKT." and I wanted only the "XCMWTC.MMMTTT"
and I will make this as my filenme. How could I do this?

Please help me. thanks.
August



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
Change 3 letter text string to a number string Pete Excel Discussion (Misc queries) 3 December 31st 07 07:47 PM
counting the number of instances of a string within another string Keith R Excel Worksheet Functions 3 March 5th 07 06:54 PM
Maybe cancatenate Wanna Learn Excel Discussion (Misc queries) 9 December 12th 06 02:30 PM
to search for a string and affect data if it finds the string? Shwaman Excel Worksheet Functions 1 January 11th 06 12:56 AM
Cancatenate string pancho[_14_] Excel Programming 0 August 21st 03 05:21 PM


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