Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Couple of things. The value of stri is passed rather than the variable so you have nothing via which to return a value.
Instead of a subroutine use a function to return a value.
The other problem is that the function does not return a value if it is within a sheet module. So either move the function to a standard code module or write a new function in a code module within the workbook that uses the sheet level code.
Bookmarks