+ Reply to Thread
Results 1 to 3 of 3

Match and return multiple results

  1. #1
    Registered User
    Join Date
    12-16-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    2

    Match and return multiple results

    Hello,

    I have an array formula that gives me the results I want but it is slow, and as I need to use it many times (around 60 instances or so), in it's current form it's unusable! can anyone help me refine it?

    =INDEX(PerfData!$B:$B, SMALL(IF($B$2=PerfData!$D:$D, ROW(PerfData!$D:$D)-MIN(ROW(PerfData!$D:$D))+1, ""), ROW(A1)))

    I am looking up a name from a list box (b:2), finding all matching instances of this name on another worksheet (PerfData, column D:D), and then returning the number listed in the corresponding cell in another column (PerfData, column B:B).

    Is there a faster way around this? I'm sure there must be, as this doesn't seem to be a particularly complicated thing that I'm trying to do, but my Excel skills aren't strong enough!

    Thanks
    J

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Match and return multiple results

    Yes is the answer but the first question would be - how much data do you have ?

    In XL2007 you have 1m+ rows - given you're referencing 1m+ cells (entire column references) the number of iterative calculations taking place is horrendous.
    Prior to XL2007 entire column references aren't permitted - and in that version there are less than 66k rows - 1m rows is obviously pretty oppressive

    If your range to review is relatively small the Arrays should be ok if you modify the references ... if however you have a large data set then you should be pursuing alternative methods (use of "helper" cells etc...)

    Without knowing your end goal it may also be the case that you should be using a Pivot Table - PerfData as source with Name (B2) as a Report Filter.

  3. #3
    Registered User
    Join Date
    12-16-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Match and return multiple results

    DonkeyOte:

    Thank you for the tip! I reduced down the whole column refs to a range more closely fitting my data and things sped up remarkably.

    I'm not sure if this deserves a new thread, but I have a follow on issue now that this is up to a decent sped, which you could perhaps help me with. Once the results are in, I have many other columns populating with Vlookups using the ID number I returned with the original formula. This also works fine, but I am unable to sort my new data by anything but the date returned by the original formula.

    For example, one column is a date column. When I sort by this column, for a fraction of a second it rearranges correctly, but then as the formulas get processed, it sorts right back by the ID column.

    Thanks again.

+ 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