+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP array function returns the same column

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2008
    Posts
    3

    VLOOKUP array function returns the same column

    Hello,

    I have a dataframe with rownames that I wish to match up with a longer list of names. There are also several columns associated with the dataframe that I wish to also match up with the long list. This will result in a larger dataframe where the rownames in the list that are not found in the dataframe will simply take zero values.

    Example Picture:
    Attachment 193782

    It seems like I should be able to do this with an array VLOOKUP function as follows:

    {=VLOOKUP($A3,$B$3:$AJ$19,{2,3,4,5},FALSE)}

    However, when I copy and paste this to adjacent columns, it returns the values from column 2 into all new columns.

    Example:
    Attachment 193785

    Any thoughts?

    Thank you

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: VLOOKUP array function returns the same column

    Hi murphy,

    I've never seen VLOOKUPs used like this...

    Just simplify your formula to =VLOOKUP($A3,$B$3:$AJ$19,2,FALSE) then copy this to the other columns, but you have to change 2 to 3, and 4 and 5 separately... and you don't have to array enter...

    Hopet this helps...

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2008
    Posts
    3

    Re: VLOOKUP array function returns the same column

    Hi,

    Thanks for the tip. This is how I started to do it. However, I have so many columns in my actual data, and I'm doing this for several different dataframes, that doing so would be extremely tedious. I was hoping to find a way to type one VLOOKUP function into a cell and then drag-paste it across all the cells I wish to fill. Think this is possible?

    Thanks again,

    Stephen

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: VLOOKUP array function returns the same column

    you can try it like this

    =VLOOKUP($A3,$B$3:$AJ$19,COLUMN(A1),FALSE) fill to adjacent cells -> try to change the underlined to meet your required return column number.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Registered User
    Join Date
    11-14-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2008
    Posts
    3

    Re: VLOOKUP array function returns the same column

    Great thanks! The COLUMN function made everything work.

+ 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