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

Hi
try
left(your_str,InStr(your_str," ")-1)

--
Regards
Frank Kabel
Frankfurt, Germany
"JayCeeJay" schrieb im
Newsbeitrag ...
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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA String manipulation

your_str represents what? The range of cells that contain the run-on text?? I'm confused about how toopen the vba window and where to insert the code.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default VBA String manipulation

Hi
o.k. I thought you alreday had some code for which you only want to add
some string manipulation. your_str is dummy variable for which you have
to assign for example the value of a cell. e.g.
your_str = activecell.value

But if you're happy with worksheet function you may use the following
formula in a helper column. E.g. lets say your data is in column A
enter the following in B1:
=LEFT(A1,FIND(" ",A1)-1)
and copy down


--
Regards
Frank Kabel
Frankfurt, Germany

JayCeeJay wrote:
your_str represents what? The range of cells that contain the run-on
text?? I'm confused about how toopen the vba window and where to
insert the code.


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
String Manipulation String Manipulation Excel Discussion (Misc queries) 3 November 30th 05 11:51 PM
VBA String manipulation Chip Pearson Excel Programming 0 March 4th 04 11:02 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 06:48 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"