View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Accessing substrings quickly

The Mid function is one of VB's fastest executing functions... you won't
find a faster way to extract a character from a string than it.

--
Rick (MVP - Excel)


"Robert Crandal" wrote in message
...
Do I need to use the "Mid" function each time I want
to access a substring??

For example, rather than using the following:

mysubstring = Mids(src, 5, 1) ' get 5th character/string

can't I use some other array/index notation
like the following:

mysubstring = src(5)

I get the impression that my code would run a lot faster
if I could access my substrings by an index, rather than
making calls to functions such as Mids(), Instr(), etc....

thank u