In VBA help, the syntax for the replace function is: Replace(expression, find, replace, [start], [count], [compare])
I tried the following (in VBA): Msgbox Replace("Green apple", "e", "a", 7)
I was expecting "Green appla" to be the returned text, but only "appla" was returned. Is this correct? I thought the start argument was the position where the function starts looking for the 'find' substring, not the position at which the returned value begins.
My example was taken from the following page: http://www.webcheatsheet.com/SQL/access_functions/replace.php
That page is about Access, but I'm sure it's the same function in Excel - in any case, the 'unexpected' result ("appla") is identical in both access and excel.
I tried the following (in VBA): Msgbox Replace("Green apple", "e", "a", 7)
I was expecting "Green appla" to be the returned text, but only "appla" was returned. Is this correct? I thought the start argument was the position where the function starts looking for the 'find' substring, not the position at which the returned value begins.
My example was taken from the following page: http://www.webcheatsheet.com/SQL/access_functions/replace.php
That page is about Access, but I'm sure it's the same function in Excel - in any case, the 'unexpected' result ("appla") is identical in both access and excel.