View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] aidan.heritage@virgin.net is offline
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