+ Reply to Thread
Results 1 to 5 of 5

Vlookup

  1. #1
    Registered User
    Join Date
    12-26-2009
    Location
    Moore, Oklahoma
    MS-Off Ver
    Excel 2007
    Posts
    20

    Vlookup

    I have a worksheet that has a table called "Requirements" that list 60 different aircraft in column B vertically with the requirements listed horizontally (columns C thru AF) behind each aircraft number. (I am using column A for a key ID for the lookup use function in VLOOKUP.) I am building another worksheet to display the data per my choosing by row. I have tried to use VLOOKUP and the best I can get displayed is what in column C from the "Requirements" table. What do I need to do to display all the data in the row on the other worksheet?


  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vlookup

    Hi,

    Not quite sure what you're getting at here. A Vlookup can only return one value from a table. That's value is defined by the 3rd element in the Vlookup and refers to the column number of the table. If you're getting a column C value from a table that starts in column B then presumably you have specified the 2nd column.

    However I suspect what you should be really using is the Data Filter functionality. This will either filter a table according to a criteria you select, or alternatively extract the records from a table to another sheet and/or range.

    If you still have problems after trying the Data Filter, upload a workbook with a before and after position and no doubt someone will be able to advise further.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Vlookup

    You need to construct a Vlookup formula for each column in your target worksheet.

    If you want to return the second column of the Vlookup table, use

    =Vlookup(A1,Sheet1!$A$2:$AF:$2,2,False)

    For the next column, use

    =Vlookup(A1,Sheet1!$A$2:$AF:$2,3,False)

    You can also construct a formula that can be copied across the columns, without having to adjust every single column if you use the COLUMN() function as the third argument of the Vlookup. Something like

    =Vlookup(A1,Sheet1!$A$2:$AF:$2,COLUMN()+1,False)

    COLUMN() returns the number of the current column, so A is 1, B is 2 , etc. You need to adjust the COLUMN() output by adding or subtracting the required number to arrive at the correct column for your Vlookup return..

    hth

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup

    =Vlookup(A1,Sheet1!$A$2:$AF:$2,COLUMNS($A$1:B$1),False)
    dragged across
    Last edited by martindwilson; 01-23-2010 at 10:35 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    12-26-2009
    Location
    Moore, Oklahoma
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Vlookup

    thanks, with a little adjustment it worked like a charm.

+ 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