+ Reply to Thread
Results 1 to 5 of 5

help in using vlookup for finding a record in another workbook

  1. #1
    Forum Contributor
    Join Date
    12-01-2013
    Location
    Saudi
    MS-Off Ver
    Excel 2007
    Posts
    103

    help in using vlookup for finding a record in another workbook

    hi everyone just want to ask about vlookup im having a problem. please check my attached excel file for more info.

    thank you in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: help in using vlookup for finding a record in another workbook

    You need to give each record its own unique reference. You can do this by putting this formula in A7 of the dwg_list file:

    =IF(B7="","",B7&"_"&COUNTIF(B$7:B7,B7))

    Then copy this down - do you see that it has added a unique sequential number to the end of the subref?

    Then your VLOOKUP in the other file can start of with:

    =VLOOKUP($B$2&"_"&ROWS($1:1), ...

    and when this is copied down the ROWS($1:1) term will change on successive rows to return 1, 2, 3, 4 etc., enabling you to extract each multiple row in turn.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    12-01-2013
    Location
    Saudi
    MS-Off Ver
    Excel 2007
    Posts
    103

    Re: help in using vlookup for finding a record in another workbook

    Quote Originally Posted by Pete_UK View Post
    Then your VLOOKUP in the other file can start of with:

    =VLOOKUP($B$2&"_"&ROWS($1:1), ...

    and when this is copied down the ROWS($1:1) term will change on successive rows to return 1, 2, 3, 4 etc., enabling you to extract each multiple row in turn.

    Hope this helps.

    Pete
    hi Pete_UK

    thank you for your reply Pete_UK. sorry for the late reply i try the formula but still the same on my sample.

    here what i do based on your formula.
    =VLOOKUP($B$2&"_"&ROWS(1:1),'[dwg list.xlsx]dwglist'!$A$7:$E$276,2,0)

    and also i notice that if i want to make another reference it will replace the data on the log its not adding a new data.

    thank you in advance

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: help in using vlookup for finding a record in another workbook

    hi civram. you missed out a crucial dollar sign from Pete's suggestion:
    =VLOOKUP($B$2&"_"&ROWS($1:1),'[dwg list.xlsx]dwglist'!$A$7:$E$276,2,0)

    you also need to make the col_index_num increase. so...
    =VLOOKUP($B$2&"_"&ROWS($1:1),'[dwg list.xlsx]dwglist'!$A$7:$E$276,COLUMNS($A8:A8)+1,0)

    and if possible, can they both in in 1 workbook instead of 2? excel works harder when they are in 2 different workbooks.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Forum Contributor
    Join Date
    12-01-2013
    Location
    Saudi
    MS-Off Ver
    Excel 2007
    Posts
    103

    Re: help in using vlookup for finding a record in another workbook

    hi benishiryo

    thank you for your reply and sorry for the late response i try the formula its working but the problem is when i add a new sub ref. all the details in log will change. what im trying to do is for example i enter sub ref 001 all the details will show in the log and i add another sub ref 002 so on.. this log will copy the details in the list and store it.

    thank you in advanced!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 11-27-2013, 10:37 AM
  2. Finding the last Record
    By anil.kuchan in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-30-2013, 07:46 AM
  3. Finding the Next Record
    By rjbautista20 in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-05-2012, 06:47 PM
  4. [SOLVED] Finding and Amending a record
    By Duncan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2005, 11:35 AM
  5. [SOLVED] Finding last record in month for each of several types of record.
    By Richard Buttrey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2005, 10:06 PM

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