+ Reply to Thread
Results 1 to 5 of 5

VlookUp between two workbook & different sheets

  1. #1
    Registered User
    Join Date
    04-12-2010
    Location
    singapore
    MS-Off Ver
    Excel 2007
    Posts
    96

    Talking VlookUp between two workbook & different sheets

    Hi, All. I need the macro to look up the no. from the DataBase (sheet1 and sheet2 )then put the no. to the File1 which has 3 sheets. Please help with this. And check the attachment below. Thanl you so much!
    Attached Files Attached Files
    Last edited by yjmmay34; 06-10-2010 at 10:01 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VlookUp between two workbook & different sheets

    Put this formula in F8 on any File1 sheet...then copy down:

    =INDEX([DataBase.xls]Sheet1!$D:$D, MATCH(C8, [DataBase.xls]Sheet1!$A:$A, 0))


    If the name is in the database, you will get a number, otherwise a Not Available (#N/A) response.

    No macro needed for this.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: VlookUp between two workbook & different sheets

    I am returning your file file1.xls. In this file see the formula in sheet A cell F8.This is copied down in sheet A of column F till there is data in column C

    copy the formula in this F8(repeat F8 of sheet A) in F8 of sheet B and sheet C
    ine each of the sheests copy F8 down.

    how to copy the formula

    go to formula bar of F8 of sheet A of file1.xls
    highlight the formula
    click edit-copy
    hit ESc key
    select F8 of sheet B and type single apostrophe (') and hit control+V
    hit entery key
    go back ot F8 of sheet B and remove the single apostrophe(') in the beginning of the formula and hit enter key.
    copy F8 sheet B down
    do similar action with sheset C


    I have configured the formula for possible 100 rows in datbase.xls file in both the sheets.

    for completion sake the formula in F8 of sheet A in file files1.xls is given below

    =IF(ISNA(VLOOKUP(C8,[DataBase.xls]Sheet1!$A$4:$D$100,4,0)),VLOOKUP(C8,[DataBase.xls]Sheet2!$A$4:$D$100,4,0),VLOOKUP(C8,[DataBase.xls]Sheet1!$A$4:$D$100,4,0))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-12-2010
    Location
    singapore
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: VlookUp between two workbook & different sheets

    Hi,venkat. Thanks for the help. But i need a macro to auto run this program. Do you know how to write code to work out this part?

  5. #5
    Registered User
    Join Date
    04-12-2010
    Location
    singapore
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: VlookUp between two workbook & different sheets

    HI, Jbeaucaire. Thank you. But this VlookUp is just a part of my program. Inside my macro there are other works to do, so i want this VlookUp macro then just put inside the whole program.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1