Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default removing certain text from a string

I have a column of report designators that consist of a bunch of text
separated by hyphens
xxx-xx-xxx-xxxxxyyyyy-nnnn-nnnn

I want to end up with the text in the middle to be copied to another column.
However, I can not (that I am aware of) use the mid function because the
length of the strings between the hyphens can vary.

Any suggestions would be greatly appreciated.
TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default removing certain text from a string

Sub TTT()
sStr = "xxx-xx-xxx-xxxxxyyyyy-nnnn-nnnn"
v = Split(sStr, "-")
MsgBox v(3)
End Sub

Requires xl2000 or later
--
Regards,
Tom Ogilvy


"Papa Jonah" wrote in message
...
I have a column of report designators that consist of a bunch of text
separated by hyphens
xxx-xx-xxx-xxxxxyyyyy-nnnn-nnnn

I want to end up with the text in the middle to be copied to another

column.
However, I can not (that I am aware of) use the mid function because the
length of the strings between the hyphens can vary.

Any suggestions would be greatly appreciated.
TIA



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
removing value within a string Jane Excel Worksheet Functions 13 February 23rd 07 03:57 AM
Please help with removing text string excelator Excel Discussion (Misc queries) 3 August 15th 06 12:08 AM
removing part of text string to another cell jamie_k Excel Discussion (Misc queries) 2 July 24th 06 10:57 AM
Removing numbers from the beginning of a text string Night Owl Excel Worksheet Functions 3 May 13th 05 05:52 PM
Removing characters from a text string zaisaki Excel Programming 3 August 28th 04 05:24 PM


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