ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   InstrRev Issue (https://www.excelbanter.com/excel-discussion-misc-queries/160740-instrrev-issue.html)

Ajit

InstrRev Issue
 
I am trying to find the position of the last occurance of "\" in my string
using the below and all I get is 60 (always - i tried changing the position,
string etc) which does not seem to be correct.

MsgBox InStrRev(.FoundFiles(i), "\")

Can anyone suggest what am I doing wrong?
--
Ajit

Barb Reinhardt

InstrRev Issue
 
Syntax
InStrRev(string1, string2[, start[, compare]])
The InStrRev function syntax has these parts:

Part Description
string1 Required. String expression being searched.
string2 Required. String expression being searched for.
start 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.
compare Optional. Numeric value indicating the kind of comparison to use
when evaluating substrings. If omitted, a binary comparison is performed. See
Settings section for values.


--
HTH,
Barb Reinhardt



"Ajit" wrote:

I am trying to find the position of the last occurance of "\" in my string
using the below and all I get is 60 (always - i tried changing the position,
string etc) which does not seem to be correct.

MsgBox InStrRev(.FoundFiles(i), "\")

Can anyone suggest what am I doing wrong?
--
Ajit



All times are GMT +1. The time now is 12:31 AM.

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