+ Reply to Thread
Results 1 to 8 of 8

Extended VLOOKUP to match multiple entries

  1. #1
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Extended VLOOKUP to match multiple entries

    Hi Wizards,

    Is there any simpler way by which the VLOOKUP functionality can be enhanced for the following requirement?

    For example, say there are 2 columns named ID and Account #, with multiple entries of different Account # for different IDs. There may be multiple IDs and multiple account numbers.

    My requirement is to match and get all the account # for all unique IDs. By using vlookup, i can get only the first account # for an ID. How can i extend the functionality of vlookup to get all related accounts for a particular ID?

    Is there some other simple formula which can be used or can this be done with VBA?
    I tried to write a formula using INDEX, MATCH functions in a IF condition but since there are lots of account numbers to be matched against thousands of IDs, i'm unable to extend the formula to all IDs. The workbook gets corrupted at times. Can someone help??

    Sarang

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Extended VLOOKUP to match multiple entries

    What about a pivot table? Post a workbook perhaps.

  3. #3
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Extended VLOOKUP to match multiple entries

    Hi Stephen,

    Using a Pivot table won't help my cause for further analysis on this data.

    The formula works fine, my only problem is that since the data is huge, the workbook takes too long to get saved or at times gets corrupted. I need a solution or i need to simplify the formula. I use Excel 2007.

    Are there any simpler ways?


    Sarang
    Attached Files Attached Files
    Last edited by Saarang84; 10-28-2010 at 10:45 AM. Reason: Upload Attachment

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Extended VLOOKUP to match multiple entries

    Without seeing your data or your formula it's very hard to say. Perhaps it could be organised more rationally, perhaps there is a better formula, perhaps ...

  5. #5
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Extended VLOOKUP to match multiple entries

    What's wrong with what you have on the pivot sheet?

  6. #6
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Extended VLOOKUP to match multiple entries

    Hi Stephen,

    As said earlier, using a pivot table wouldn't serve my cause for further analysis. Here's a sample mock workbook with the formula that i tried out. I need the output in this format.


    Sarang
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Extended VLOOKUP to match multiple entries

    Sarang, so far all you've said is that
    My requirement is to match and get all the account # for all unique IDs
    . A pivot table does that.

    The formula in your file seems to be working so I don't know what the problem is.

    VBA is always another approach.

  8. #8
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Extended VLOOKUP to match multiple entries

    I got hold of this function from one of the many forums on the web:

    Please Login or Register  to view this content.

    It works fine as i want it to but the last parameter of the above function needs to be manually changed everytime. Can that parameter be replaced by some counter function (count, countif) or something else?

    Sarang

+ 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