Lookup Across Workbooks

  • Hi,

    I have two excel files.

    file1 contains emp code,basic and
    file 2 contains emp code ,dept code,emp name.

    now i want to have update the basic in to the file2 (emp code,dept code,emp name,basic).

    which syntax to be used in excel . please provide with example.

    thanks in advance.


  • Re: If Condition

    Hi ma,

    questions belongs in the Excel/VBA forum, but in File 2 cell D2

    Try =VLOOKUP(A2,[FILE1]Sheet1!LOOKUPRANGE,2,0)

    and copy down


    File 2 cell A2 holds your 1st Emp Code
    File 1 Sheet1 has a ranged named LOOKUPRANGE which holds the Emp Code and Basic
    The first column in this range is emp code
    The second column in this range has the basic
    You want the basic in column D of file 2 for each emp

    See help for VLOOKUP for more details


    If absence makes the heart grow fonder, and familiarity breeds contempt, perhaps my wife should live in Darwin?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!