Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default STRING MANIPULATION !!

Hello !

AA is a variable that contains a string. BB is another string variable.

I need a macro that will create a new string CC which is made by
inserting BB into AA (after the first word in AA).

Example: If AA="They are capable" and BB="think they", then CC should be
"They think they are capable." Any help would be apreciated!

Thanks
Jay



*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default STRING MANIPULATION !!


Heres 1 way


Code:
--------------------

Sub ManipulateText()
Dim AA As String
Dim BB As String
Dim CC As String
Dim iPos As Integer


AA = "They are capable"
BB = "think they"

iPos = InStr(1, AA, " ")
CC = Left(AA, iPos) & BB & Mid(AA, iPos)
MsgBox CC
End Sub

--------------------


--
mudraker

If my reply has assisted or failed to assist you I welcome your
Feedback.

www.thecodecage.com
------------------------------------------------------------------------
mudraker's Profile: http://www.thecodecage.com/forumz/member.php?userid=18
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90317

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
String Manipulation within VBA BillCPA Excel Discussion (Misc queries) 2 December 6th 06 05:29 PM
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) Brian Excel Programming 3 February 9th 06 03:38 PM
Importing Long String - String Manipulation (EDI EANCOM 96a) Brian Excel Programming 6 February 9th 06 12:27 PM
String manipulation!! Mannyluk Excel Programming 2 October 18th 04 12:42 PM
VBA String manipulation Frank Kabel Excel Programming 2 March 5th 04 07:19 AM


All times are GMT +1. The time now is 07:55 PM.

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"