InStrRev Question

R

ron

InStrRev has the following syntax

InstrRev(stringcheck, stringmatch[, start[, compare]])

According to the Help section, "start" is "Optional. Numeric
expression that sets the starting position for each search. If
omitted, –1 is used, which means that the search begins at the last
character position. If start contains Null, an error occurs."

If I set "start" to -1, the expression evaluates correctly; if I set
start to any other value, the expression evaluates to zero. How can
you use "start" in InStrRev?...TIA, Ron
 
J

Jim Cone

The start number has to be equal to or greater than the "found" position.
Character numbering starts from the left, so the found position (for example)
of "c" in "revocation" is 5.
If you specify a start number less than 5 then the search will start to the
left of the c and the function will return 0.
--
Jim Cone
Portland, Oregon USA


"ron" <[email protected]>
wrote in message
InStrRev has the following syntax

InstrRev(stringcheck, stringmatch[, start[, compare]])
According to the Help section, "start" is "Optional. Numeric
expression that sets the starting position for each search. If
omitted, –1 is used, which means that the search begins at the last
character position. If start contains Null, an error occurs."
If I set "start" to -1, the expression evaluates correctly; if I set
start to any other value, the expression evaluates to zero. How can
you use "start" in InStrRev?...TIA, Ron
 
R

ron

The start number has to be equal to or greater than the "found" position.
Character numbering starts from the left, so the found position (for example)
of "c" in "revocation" is 5.
If you specify a start number less than 5 then the search will start to the
left of the c and the function will return 0.
--
Jim Cone
Portland, Oregon  USA

"ron" <[email protected]>
wrote in message
InStrRev has the following syntax

InstrRev(stringcheck, stringmatch[, start[, compare]])
According to the Help section, "start" is "Optional. Numeric
expression that sets the starting position for each search. If
omitted, –1 is used, which means that the search begins at the last
character position. If start contains Null, an error occurs."
If I set "start" to -1, the expression evaluates correctly; if I set
start to any other value, the expression evaluates to zero.  How can
you use "start" in InStrRev?...TIA, Ron

Jim...Thanks for the clear explanation and example, now I
understand...Best, Ron
 
N

Nigel

You could always set the start position as Len(stringcheck) for example

--

Regards,
Nigel
(e-mail address removed)



The start number has to be equal to or greater than the "found" position.
Character numbering starts from the left, so the found position (for
example)
of "c" in "revocation" is 5.
If you specify a start number less than 5 then the search will start to
the
left of the c and the function will return 0.
--
Jim Cone
Portland, Oregon USA

"ron" <[email protected]>
wrote in message
InStrRev has the following syntax

InstrRev(stringcheck, stringmatch[, start[, compare]])
According to the Help section, "start" is "Optional. Numeric
expression that sets the starting position for each search. If
omitted, –1 is used, which means that the search begins at the last
character position. If start contains Null, an error occurs."
If I set "start" to -1, the expression evaluates correctly; if I set
start to any other value, the expression evaluates to zero. How can
you use "start" in InStrRev?...TIA, Ron

Jim...Thanks for the clear explanation and example, now I
understand...Best, 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

Top