# Excel Macro : get the last index of a character in a string



## ananya choudhury (Aug 13, 2008)

Hi All,

I have a string having the absolute name of a file say, "Z:\BedrockDocs\TestAndReports\Performance\Bedrock_Performance_Test_080807.xls"

Now I have to extract just the fileName i.e. "Bedrock_Performance_Test_080807.xls"

Is there any like string.LastIndexOf("\") as in C#, in excel macro??


Thanks for the help in advance.

-Ananya


----------



## -Fabez- (Jul 28, 2008)

I have an idea but its a bit long winded, would you like me to try and explain it?


----------

