+ Reply to Thread
Results 1 to 16 of 16

VLOOKUP - Return multiple columns

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    48

    VLOOKUP - Return multiple columns

    Hi!

    Got a small problem with VLOOKUP, How do i make VLOOKUP return all the info from column C to P in the specific row that VLOOKUP looks for?

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: VLOOKUP - Return multiple columns

    Hi

    Can you upload a small sample workbook pls?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: VLOOKUP - Return multiple columns

    Hi, Please check the formula in the attached file. To enter the formula, you need to select B8:P8, enter the formula with Ctrl+Shift+Enter. YOu can copy it to other cells after that.
    Attached Files Attached Files

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: VLOOKUP - Return multiple columns

    Hi ScaniaR730

    Another version, this is an ARRAY as well, CSE. This version is using the OFFSET Function & named ranges.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-12-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: VLOOKUP - Return multiple columns

    I haven't tried your excel's but i will do!

    gonna post image of my problem, if that is ok?

    This is the register
    vlookup2.jpg

    VLOOKUP gonna find the ID from the register and return the cells marked in the picture. When the ID-cell is empty, then the rest should be empty.
    vlookup.jpg

    Thanks for you help!
    Last edited by ScaniaR730; 10-12-2012 at 08:12 AM.

  6. #6
    Registered User
    Join Date
    10-12-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: VLOOKUP - Return multiple columns

    Thanks, Sindhus. This is the way i wanted it, but can't really understand the formula so could you please just explain it quick!


    Quote Originally Posted by Sindhus View Post
    Hi, Please check the formula in the attached file. To enter the formula, you need to select B8:P8, enter the formula with Ctrl+Shift+Enter. YOu can copy it to other cells after that.

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: VLOOKUP - Return multiple columns

    What are you exactly after!! You have had 2 perfectly good answers given to you, slightly different but producing the same result.

    What's with the pictures,why don't you upload a sample file!

    Are you now saying that you want to have 2 lookup criteria as highlighted Red!
    VLOOKUP gonna find the ID from the register and return the cells marked in the picture. When the ID-cell is empty, then the rest should be empty.
    vlookup.jpg

  8. #8
    Registered User
    Join Date
    10-12-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: VLOOKUP - Return multiple columns

    Well Kevin, i actually said thanks to Sindhus. Just wanted the formula explained.

    Dont mind the red highlighted part, i'm gonna place a IF-formula there once i get some help with the lookup-formula.

    Gonna upload the file so you guys can see my problem.
    Attached Files Attached Files
    Last edited by Cutter; 10-14-2012 at 12:36 PM. Reason: Removed whole post quote

  9. #9
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: VLOOKUP - Return multiple columns

    Hi ScaniaR730

    Not quite sure what the problem is! Maybe as attached.
    See the attached worksheet. When you enter this formula you select all the cells as highlighted and in cell B4 enter the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    CTRL + SHIFT + ENTER

    Kevin
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-12-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: VLOOKUP - Return multiple columns

    Well, there wasn't really a problem. I could have used LOOKUP in each cell to do the job but figured that there must be an easier way to do it.
    Do you mind explain the formula?

    Got a final problem i hope you can help me with,

    Once "ID" is entered, i have to enter a number in let's say B4(Deläckra), like 0,050. Then take the info from H4, find it in 'Godskod' (A51) and return with the info from B51 and fill it in I4(Deläckra), 2220. Possible?

  11. #11
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: VLOOKUP - Return multiple columns

    Hi ScaniaR730

    Try the Microsoft support site, array formulas explained.

    Introducing array formulas in Excel

  12. #12
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: VLOOKUP - Return multiple columns

    I added two versions of VLOOKUP that don't require array. A bit easier to enter and they copy easily.
    Attached Files Attached Files
    Last edited by Jacc; 10-14-2012 at 06:03 AM.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  13. #13
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: VLOOKUP - Return multiple columns

    Quote Originally Posted by ScaniaR730 View Post
    Once "ID" is entered, i have to enter a number in let's say B4(Deläckra), like 0,050. Then take the info from H4, find it in 'Godskod' (A51) and return with the info from B51 and fill it in I4(Deläckra), 2220. Possible?
    You mean like this? I put some random functions in there too, hit F9(recalc) a 100 times and check that the Godskod is correct each time.
    Attached Files Attached Files
    Last edited by Jacc; 10-14-2012 at 06:52 AM.

  14. #14
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: VLOOKUP - Return multiple columns

    Hi ScaniaR730, If your dobut is not clarified yet, here is the explanation. In the normal vlookup function, for the third argument "Col Index Number", I have used Column(Range)-min(Column(Range))+2. When entered in array, it will return 2,3,4,etc. So, the col index number will be increased by 1 automatically for the adjacent cells.

    Quote Originally Posted by ScaniaR730 View Post
    Thanks, Sindhus. This is the way i wanted it, but can't really understand the formula so could you please just explain it quick!

  15. #15
    Registered User
    Join Date
    10-12-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: VLOOKUP - Return multiple columns

    Thanks alot, Sindhus!

    Well, Jacc, "ZON"-column need to be like ZON1, ZON2, ZON3 and not 1, 2, 3. Since the worksheet is gonna be save as a txt and imported to another software.

  16. #16
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: VLOOKUP - Return multiple columns

    Even easier then.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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