Need help with a function

G

Guest

Hi

I'm sorry but I'm not too much familiar with Excel. I have some listing in
column A

For example

in A1 I have:
D:\blabla\folder1\file1.xxx
in A2 I have:
D:\blabla\folder2\file2.xxx
in A3 I have:
D:\blabla\folder3\file3.xxx

I want the word between the 2nd and 3rd '\' to be in color red. So in A1
folder1 should be in red, in A2 folder2 in red etc

I could do it manually but there are like 3000 lines. It would take forever.
Is this simple to achieve with a script/macro/? ? I hope someone can help me.

Thanks in advance.
Christophe
 
B

Bob Phillips

Presumably you want to pick that value out. Why not put it in an adjacent
cell. You can do that with

=MID(A1,FIND("~~",SUBSTITUTE(A1,"\","~~",2))+1,FIND("~~",SUBSTITUTE(A1,"\","
~~",3))-FIND("~~",SUBSTITUTE(A1,"\","~~",2))-1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top