Forum Discussion

SergeiBaklan's avatar
SergeiBaklan
Diamond Contributor
Mar 14, 2018

Re: Vlookup referencing second excel file help.

Chad, close the second file (or both, when re-open), file path will be added to link automatically.

7 Replies

  • Chad Briddell's avatar
    Chad Briddell
    Copper Contributor

    Sergei - thanks for responding. still no success. 

    1 - i closed both files. then opened file 1 and in the cell where i want the value returned via vlookup i have:

    '=vlookup(C12,[C:\Chad\Data\2018-Std-Cost.xlsx]Sheet1!A2:E10,5,false)

    then, i  removed the " ' " from the front of the formula and i get an error message:  "The syntax of this name isn't correct".

     

    2 - i tried in a new cell to create the vlookup and open the second file during the process of creating the vlookup. Excel errors and states i have entered "too few arguments" and won't let me open the second file.

     

    is there some kind of Excel/Option setting that is off?

    • Rohan Menon's avatar
      Rohan Menon
      Copper Contributor

      If the files are in the same directory don't mention the full path

      instead of =vlookup(C12,[C:\Chad\Data\2018-Std-Cost.xlsx]Sheet1!A2:E10,5,false)

      try =VLOOKUP(C12,[2018StdCost.xlsx]Sheet1!A2:E10,5,FALSE)

      Change the file name from 2018-Std-Cost.xlsx to 2018StdCost.xlsx

      The '-' in the file name may be causing the problem.


      Chad Briddell wrote:

      Sergei - thanks for responding. still no success. 

      1 - i closed both files. then opened file 1 and in the cell where i want the value returned via vlookup i have:

      '=vlookup(C12,[C:\Chad\Data\2018-Std-Cost.xlsx]Sheet1!A2:E10,5,false)

      then, i  removed the " ' " from the front of the formula and i get an error message:  "The syntax of this name isn't correct".

       

      2 - i tried in a new cell to create the vlookup and open the second file during the process of creating the vlookup. Excel errors and states i have entered "too few arguments" and won't let me open the second file.

       

      is there some kind of Excel/Option setting that is off?


       

       

       

       

      • Chad Briddell's avatar
        Chad Briddell
        Copper Contributor

        thanks Rohan. i removed the "-" from the second file name. also, instead of manually typing the formula, i had the wizard create it.  while using the wizard, i was not able to open a second file. so i tried again and opened both files and started the wizard. everything worked as expected. i am good to go....i hope!  thank you

    • SergeiBaklan's avatar
      SergeiBaklan
      Diamond Contributor

      That's perhaps you add sheet name manually. It shall be like this

      Both files are opened

      =VLOOKUP(D13,[Example5.xlsx]Sheet1!$A$1:$B$4,2,FALSE)

      second file is closed, full link autogenerated

      =VLOOKUP(D13,'G:\MyFolder\[Example5.xlsx]Sheet1'!$A$1:$B$4,2,FALSE)