Result = FIND("def","abcdefghiabcdef")
My task is to create a custom function in Excel, named XFIND(), that overcomes these limitations, as follows:
· The function should return 0 (zero) if the search string isn't found. This makes it much easier for the user to handle a failed search.
· Write the StartingPosition argument so that it searches for successive occurrences of a substring by occurrence number, without having to know the starting position of previous occurrence(s). In other words, to find the second occurrence of "abc" in the example above, the user would enter '2' as the starting position instead of ‘5,’ (one position past the first occurrence). XFIND() will return '10,’ just as FIND() and SEARCH() would do.
· The order of the arguments should be the same as FIND and SEARCH, to reduce confusion.
· Add a final optional argument that allows the user to specify case sensitivity.
I am having issues getting this to work properly
My task is to create a custom function in Excel, named XFIND(), that overcomes these limitations, as follows:
· The function should return 0 (zero) if the search string isn't found. This makes it much easier for the user to handle a failed search.
· Write the StartingPosition argument so that it searches for successive occurrences of a substring by occurrence number, without having to know the starting position of previous occurrence(s). In other words, to find the second occurrence of "abc" in the example above, the user would enter '2' as the starting position instead of ‘5,’ (one position past the first occurrence). XFIND() will return '10,’ just as FIND() and SEARCH() would do.
· The order of the arguments should be the same as FIND and SEARCH, to reduce confusion.
· Add a final optional argument that allows the user to specify case sensitivity.
I am having issues getting this to work properly