+ Reply to Thread
Results 1 to 4 of 4

Array Formula with dynamic column search

  1. #1
    Registered User
    Join Date
    07-19-2014
    Location
    South Korea
    MS-Off Ver
    2013
    Posts
    2

    Question Array Formula with dynamic column search

    Greetings all and thanks for looking at this post for me. I am using an array formula to aggregate some data from another sheet for printing purposes for a 3 week block from a FY calendar. Rows in my sheets are student counts for classes, the columns (H:JN) are dates for schedules.

    The current formula works as written here:

    {=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH(NOFLY_CRITERIA,S$2)))))>0,"", SUM(IF(FY_CALENDAR!$G23:$G71="STUDENTS",FY_CALENDAR!S23:S71)))}

    The basic calculation is that first it checks whether the day is a weekend or holiday and returns empty if so, if not, then it goes to my calendar and pulls a sum of total students assigned on that day. In its current form, it works fine because the dates on this sheet are in the same columns as the dates on the FY calendar sheet.

    The problem is now that I would like to be able to change the dates on this sheet to project a future date, so any date can be selected. That updates my columns on this sheet to a dynamic 3 week range. However, the formula no longer pulls the right data. I need to update the last argument of my SUM(IF function to find the column that has the date that matches the column from this sheet. INDEX/MATCH are always my go to, but I've never gotten them to work in an array formula. I am attempting to use an INDIRECT/ADDRESS method, but am getting errors and would love some assistance getting the syntax right... here is what I have:

    T$6 = the date on this sheet for the current calculation
    $6:$6 = My row of sequential dates on my FY calendar
    Rows 23 and 71 in the address blocks are the row range for this syllabus to search in

    {=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH(NOFLY_CRITERIA,T$2)))))>0,"", SUM(IF(FY_CALENDAR!$G23:$G71="STUDENTS",INDIRECT(ADDRESS(23, MATCH(T$6, FY_CALENDAR!$6:$6,0),,,FY_CALENDAR)&":"& ADDRESS(71, MATCH(T$6, FY_CALENDAR!$6:$6,0),,,FY_CALENDAR)))))}

    Any help would be appreciated. best, current result is #NAME?

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Array Formula with dynamic column search

    Hello and welcome to the forum.

    I recommend uploading a small representative sample of your data along with the desired results (which you can enter manually) based on that data.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  3. #3
    Registered User
    Join Date
    07-19-2014
    Location
    South Korea
    MS-Off Ver
    2013
    Posts
    2

    Re: Array Formula with dynamic column search

    Haha, nevermind. Solved my own problem pretty fast, was a matter of moving the sheet name to the front of the Indirect call:

    {=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH(NOFLY_CRITERIA,T$2)))))>0,"", SUM(IF(FY_CALENDAR!$G23:$G71="STUDENTS",INDIRECT("'FY_CALENDAR'!" & ADDRESS(23, T$7,1,1)&":"& ADDRESS(71, $T7,1,1)))))}

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Array Formula with dynamic column search

    I'm glad you got it figured out.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] Creating a dynamic array to search for multiple specific entries based on criteria
    By Travisty in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-22-2015, 05:23 AM
  2. [SOLVED] Creating a dynamic array to search for specific entries based on multiple criteria
    By Travisty in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-12-2015, 12:30 AM
  3. Replies: 1
    Last Post: 01-30-2015, 01:02 PM
  4. [SOLVED] Dynamic search; using column # result to determine column used for column/row match.
    By David Brunk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-18-2014, 09:57 PM
  5. Dynamic Row Lookup Array within Array formula
    By OLLY-7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-17-2014, 04:55 PM
  6. [SOLVED] Dynamic Search function using array formulas
    By adelcap in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-20-2012, 05:46 AM
  7. Excel 2007 : dynamic column and array
    By APPLEBEE in forum Excel General
    Replies: 4
    Last Post: 05-25-2011, 04:23 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