InStrRev

Return the position of one string within another, starting at the end of the string.

Syntax
      InstrRev ( FullString, PartString, [start], [compare] )

Key
   FullString  The String (expression) to be searched.

   PartString  The String (expression) being sought.

   Start       Number (expression) that sets the start position for each search.
               Default=-1 (the last character)

   compare     The comparison mode (Binary/Text)

The InStrRev() function may be used in VBA or in an SQL query.
Note that the syntax for the InstrRev function is not the same as the syntax for the Instr function.

Return values

If

InStr returns

FullString is zero-length

0

FullString is Null

Null

PartString is zero-length

start

PartString is Null

Null

PartString is not found

0

PartString is found within FullString

Position at which match is found

start > FullString

0

Example

Dim intDemo as Integer

intDemo = InStr("The Universe is expanding", "U")
MsgBox intDemo

“One look is worth a thousand words” ~ Fred R. Barnard

Related:

Instr - Return the position of one string within another



Back to the Top

© Copyright SS64.com 1999-2013
Some rights reserved