+ Reply to Thread
Results 1 to 8 of 8

Array Lookup

  1. #1
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Array Lookup

    HI,

    I am using the following array formula to get all the details from a table for all tasks allocated to a specific person (F1)

    However, i wish to check the status also which is in column D

    =IFERROR(INDEX($A:$A,SMALL(IF($B:$B=$F$1,ROW($B:$B)),ROWS($A$2:$A15))),"")

    I've tried,

    =IFERROR(INDEX($A:$A,SMALL(IF(AND($B:$B=$F$1,$D:$D="Open"),ROW($B:$B)),ROWS($A$2:$A15))),"")


    But this returns 0's for the row found.

    Thanks.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Array Lookup

    hi nathan. the AND doesn't work well here as it returns only a single result. also, don't range up the whole column for the array portion. it will slow down calculations. use:
    =IFERROR(INDEX($A:$A,SMALL(IF($B$1:$B$100=$F$1,IF($D$1:$D$100="open",ROW($B$1:$B$100))),ROWS($A$2:$A15))),"")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Array Lookup

    Hi,

    The correct syntax would be:

    =IFERROR(INDEX($A:$A,SMALL(IF($B:$B=$F$1,IF($D:$D="Open",ROW($B:$B))),ROWS($A$2:$A15))),"")

    though I recommend that you don't use entire column referencing ($A:$A, $D:$D, etc.) in array formulas.

    Regards
    Click * below if this answer helped

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

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Array Lookup

    AND will not work for this array formula - you may try:

    =IFERROR(INDEX($A:$A,SMALL(IF($B:$B=$F$1,IF($D:$D="Open",ROW($B:$B))),ROWS($A$2:$A15))),"")
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Array Lookup

    Snap, snap, snap!!

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Array Lookup

    Thanks guys, the complexities of the array formula.

    This was a mock up, so hence the column full names, these will be replaced by dynamic named ranges in the full version.

    Thanks

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Array Lookup

    You're welcome.

    By the way, your profile says 2003 but assume you must be using a later version for IFERROR() to work? If so, could you update your profile?

    Regards

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Array Lookup

    Try this
    =IFERROR(INDEX($A:$A,SMALL(IF(($B:$B=$F$1)*($D:$D="Open"),ROW($B:$B)),ROWS($A$2:$A15))),"")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Lookup question matching part of lookup value in the table array
    By kosmo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-05-2013, 11:07 AM
  2. [SOLVED] Lookup a value in one array, and return a corresponding column/row in another array
    By Gunther Maplethorpe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2012, 08:47 PM
  3. Replies: 19
    Last Post: 05-09-2012, 03:31 AM
  4. Search lookup array to find lookup value contained within text string
    By Cookstein2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-02-2011, 09:42 AM
  5. Replies: 7
    Last Post: 06-19-2011, 12:51 PM

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