+ Reply to Thread
Results 1 to 5 of 5

Array Formula to Pull List Based on Date - #NUM! Error

  1. #1
    Registered User
    Join Date
    05-22-2017
    Location
    Houston, Texas
    MS-Off Ver
    2013/2016
    Posts
    20

    Array Formula to Pull List Based on Date - #NUM! Error

    Hello,

    I am trying to build a lookup formula that finds all rows with the lookup date and pulls it into a list.
    The formula I have right now works when it is just text. It does not work when it is pulling dates and gives a #NUM! error.

    Formula --> INDEX(Find_range,SMALL(IF(Date_range=Find_Date,ROW($Date_range)),ROW()-2),1)

    I appreciate you taking time to look into my problem.

    All the best.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Array Formula to Pull List Based on Date - #NUM! Error

    Use this array formula, copied across and down:
    =IFERROR(INDEX(A:A,SMALL(IF($C$4:$C$14=Find_Date,ROW($C$4:$C$14)),ROWS(G$5:G5))),"")
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Array Formula to Pull List Based on Date - #NUM! Error

    Or, if you have Excel 2010 or better (not clear from yourprofile... Is there an Excel 2011???), an ordinary formula:

    =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($C$4:$C$14)/($C$4:$C$14=Find_Date),ROWS(G$5:G5))),"")
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-22-2017
    Location
    Houston, Texas
    MS-Off Ver
    2013/2016
    Posts
    20

    Re: Array Formula to Pull List Based on Date - #NUM! Error

    Glenn Kennedy, thank you so much! Your formula works like a charm! Would you mind explaining the Aggregate function and the ($C$4:$C:$14)/($C$4:$C$14) portion of it?

    Also, my Excel is 2013/2016. I will update my MS-Off Ver.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Array Formula to Pull List Based on Date - #NUM! Error

    Using the Evaluate Formula feature may help illustrate that ROW($C$4:$C$14) produces an array {4,5,...14} and ($C$4:$C$14=Find_Date) produces an array of TRUE/FALSE values
    The binary for TRUE is 1 and for FALSE is zero so that a ROW number divided by 1 is that ROW and a ROW divided by zero yields #DIV/0
    The second argument of AGGREGATE (6) is set to ignore errors so only the numeric values are considered when looking for the Kth smallest. I hope that makes sense.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Formula Help: Using a static date reference to pull data from Array's correct column
    By JCarollo765 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-06-2019, 08:23 PM
  2. [SOLVED] Formula to pull the MIN date from a range, based on the criteria.
    By Budhdr in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-11-2018, 10:44 AM
  3. Replies: 5
    Last Post: 08-18-2016, 05:09 PM
  4. Pull Data from the list table based given date.
    By Gosa120303 in forum Excel General
    Replies: 2
    Last Post: 03-14-2016, 04:41 PM
  5. Error using Array: Index, Small, Row to pull list from PivotTable
    By lgnmag in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-25-2014, 08:39 PM
  6. Replies: 13
    Last Post: 11-25-2011, 04:57 PM
  7. Excel 2007 : Formula to pull data based off date
    By sjone24 in forum Excel General
    Replies: 0
    Last Post: 12-15-2010, 06:13 PM

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