Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default nth element extract

How do I extract the nth element of a string that contains no separators? I
can find plenty of VB routines doing this, however all of them require some
sort of separator. I want to be able to take a 10 to 15 digit alphanumeric
string and identify each character position and read the charater in that
position (including using * as a wild card).
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default nth element extract

not sure what you are trying to do, get something in the 7th position
everytime? or do you want to know the location of a certain character? the
first would be
=MID(B1,7,1)
The second would be
=FIND(A1,B1)
A1 containing what you are looking for, B1 what you are looking in this will
only show the first location found.
If neither of these then please be more specific.

--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"RSCARLISLE" wrote:

How do I extract the nth element of a string that contains no separators? I
can find plenty of VB routines doing this, however all of them require some
sort of separator. I want to be able to take a 10 to 15 digit alphanumeric
string and identify each character position and read the charater in that
position (including using * as a wild card).

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 244
Default nth element extract

On 2 Aug, 14:00, RSCARLISLE
wrote:
How do I extract the nth element of a string that contains no separators? I
can find plenty of VB routines doing this, however all of them require some
sort of separator. I want to be able to take a 10 to 15 digit alphanumeric
string and identify each character position and read the charater in that
position (including using * as a wild card).


the MID function would do this, although I'm not sure what you are
getting at with the * as wild card

for instance

dim MyStr as string
MyStr="test example"
dim looper as long
for looper=1 to len(mystr)
msgbox mid(mystr,looper,1)
next


will display one character at a time from the MyStr string

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default nth element extract

John,
Stupid me- the mid function works.

Thanks,
Steve

"John Bundy" wrote:

not sure what you are trying to do, get something in the 7th position
everytime? or do you want to know the location of a certain character? the
first would be
=MID(B1,7,1)
The second would be
=FIND(A1,B1)
A1 containing what you are looking for, B1 what you are looking in this will
only show the first location found.
If neither of these then please be more specific.

--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"RSCARLISLE" wrote:

How do I extract the nth element of a string that contains no separators? I
can find plenty of VB routines doing this, however all of them require some
sort of separator. I want to be able to take a 10 to 15 digit alphanumeric
string and identify each character position and read the charater in that
position (including using * as a wild card).

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
How to define the 1st, 2nd and 3rd element DamiaoPastana Excel Worksheet Functions 4 June 8th 06 06:55 PM
hidden element Stas Excel Worksheet Functions 1 December 6th 05 11:38 AM
hidden element Stas Excel Worksheet Functions 0 December 6th 05 11:20 AM
hidden element Stas Excel Worksheet Functions 0 December 6th 05 11:18 AM
Mapping an XML element more than once?? AStarWithin Excel Discussion (Misc queries) 1 May 3rd 05 12:39 PM


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