my vlookup path changes when I open the file

A

AliGoLightly

I have a VLOOKUP in workbook 'Report' which looks for data in workbook 'Data'.

both workbooks are stored in a common network drive \\office\reports\

the VLOOKUP is written to look in the network drive:
=vlookup(a2,'\\office\reports\[data.xlsx]sheet1'!a:f,6,false)

Often, when one of my team leaves the file, the VLOOKUP changes to
=vlookup(a2,'g:\[data.xlsx]sheet1'!a:f,6,false)

How do I stop it changing from the Network path to the mapped drive?
 
S

Shane Devenshire

Hi,

I don't know about change the mapping instruction on a machine, you might
talk to your IT people.

If both of the files are open then you can use INDIRECT to take care of your
problem: (but indirect returns an error in Excel, if the target file is
closed)

=vlookup(a2,INDIRECT("'\\office\reports\[data.xlsx]sheet1'!a:f"),6,false)

might do it.
 

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

Similar Threads

VLOOKUP 6
VLOOKUP 1
VLookup Formula 6
Using a dynamic pathname in VLOOKUP 7
Vlookup in 2007 is now case sensitive 5
Dynamic Sheet Name in Vlookup 6
make a vlookup using a variable path 1
Vlookup problem 1

Top