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