View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Richard Buttrey
 
Posts: n/a
Default Could I use Vlookup?

On Sun, 12 Mar 2006 17:16:04 -0500, Den wrote:

On Sun, 12 Mar 2006 18:11:55 +0000, Richard Buttrey
wrote:

On Sun, 12 Mar 2006 18:01:10 +0000, Richard Buttrey
wrote:


This assumes there is only one "\" before the reference to the Drive
"E:" reference. If not please post back.

=LEFT(A1,FIND("\",A1)-3)&VLOOKUP((RIGHT(A1,MATCH("\",MID(A1,LEN(A1)-ROW(1:255),1),0))),Sheet1!A2:B5,2,FALSE)

Rgds


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


Hi Richard,


I hope that I understand your question;

The exact strings that comes *before* all the "E:" are

cell[2].images[0].image=../../../
or
cell[32].images[0].image=../../../
or
cell[151].images[0].image=../../../


So there will always be three (3) "/" before the "E:" if I count them
all from the start of the line.

A precision may be needed: on the sheet 2 where we find the txt file
of the application, there are only "/" and *no* "\"

But on the other hand on sheet 1 the new filename (in the computer)
comes with "\"

But this is not a problem since I can change all those "\" that may be
present to "/" after the new filename & directories have been writen
to the txt file.

Den
Canada


Hi Den,

Hope I understand your data. Thinking a little more about this, if the
constant is the "E:" bit in the string, then it would be smarter to
use that. Hence:

=LEFT(A1,FIND("E:",A1)-1)&VLOOKUP((RIGHT(A1,MATCH("\",MID(A1,LEN(A1)-ROW(1:255),1),0))),Sheet1!A2:B5,2,FALSE)

is a more general solution and avoids having to worry about whether
there is a "\" or not.

Hope this gives you what you want.

Rgds






__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________