Interogating a string within a Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have a string called data that contains, for example, 12 characters how
can I find teh position of two charactors within it.

e.g the string is :
abhhsctdshhd

how can I find the position of 'ct' within it ?

any suggestions appreciated.

brian
 
If I have a string called data that contains, for example, 12 characters how
can I find teh position of two charactors within it.

e.g the string is :
abhhsctdshhd

how can I find the position of 'ct' within it ?

any suggestions appreciated.

brian


InStr Function

Returns a Variant (Long) specifying the position of the first occurrence of one
string within another.

Syntax

InStr([start, ]string1, string2[, compare])


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top