Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default VBA String manipulation

Try something like the following:


Dim ResStr As String
Dim SrcStr As String

SrcStr = "this is some text"
ResStr = Left(SrcStr, InStr(SrcStr, " ") - 1)
Debug.Print ResStr


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"JayCeeJay" wrote in
message
...
I am trying to manipulate incoming field info that is rather

long-winded. What I wish to do is to diplay in the destination
cells only the data to the Left of the first space (or break in
the string). I realize it probably involves a combination of VBA
functions, but I would be grateful to anyone who could help me
with it.


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
Text string manipulation... NWO Excel Worksheet Functions 4 August 3rd 07 03:31 AM
String Manipulation within VBA BillCPA Excel Discussion (Misc queries) 2 December 6th 06 05:29 PM
String Manipulation String Manipulation Excel Discussion (Misc queries) 3 November 30th 05 11:51 PM
string manipulation Craig[_8_] Excel Programming 2 January 7th 04 05:00 AM
String Manipulation Ray Batig Excel Programming 3 December 23rd 03 12:31 AM


All times are GMT +1. The time now is 01:34 AM.

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"