ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   InStrRev Question (https://www.excelbanter.com/excel-programming/422608-instrrev-question.html)

ron

InStrRev Question
 
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 Cone[_2_]

InStrRev Question
 

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"
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


ron

InStrRev Question
 
On Jan 17, 12:53*pm, "Jim Cone" wrote:
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"
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

Nigel[_2_]

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

--

Regards,
Nigel




"ron" wrote in message
...
On Jan 17, 12:53 pm, "Jim Cone" wrote:
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"
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


Ron Rosenfeld

InStrRev Question
 
On Sun, 18 Jan 2009 07:36:02 -0000, "Nigel"
wrote:

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


Operationally, how does that differ from setting it to -1?

--ron


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com