+ Reply to Thread
Results 1 to 7 of 7

Adding a date range to an already complex index array forumla

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    London, Englan
    MS-Off Ver
    Excel 2010
    Posts
    8

    Adding a date range to an already complex index array forumla

    Hello again All,
    Its been a while but once I again I require some help in solving a tricky little excel problem before the festive period begins.
    Workbook attached is to do with staff training at work and monitoring what courses have been completed by staff.

    Worksheet "Training Activity" is a list of raw data to show all training courses being taken by staff, as time progresses this list will not follow any set order as data can be added at any time and dates will not be in order, this sheet contains some basic drop down lists to bring in data from the "Data List" worksheet but that is all.

    The main worksheet I am looking to improve is "Financial Year" at the moment the table uses an array formula I have been working on for some time which contains INDEX, SMALL, IF and ISERROR calculations.

    {=IF(ISERROR(INDEX('Training activity'!$A$4:$M$16,SMALL(IF('Training activity'!$A$4:$A$16=$C$8,ROW('Training activity'!$A$4:$A$16)),ROW(1:1))-3,2)),"",INDEX('Training activity'!$A$4:$M$16,SMALL(IF('Training activity'!$A$4:$A$16=$C$8,ROW('Training activity'!$A$4:$A$16)),ROW(1:1))-3,2))}

    Basically it will scan the table on the "Training Activity" worksheet and bring in any data that matches the users Name shown in cell C8 with the relevant column in the data. It has been built in a way to ensure it shows only unique rows and does not display any lines that contain errors. This was a giant step forwards for me in going away from a standard "LOOKUP" formula.
    My next challenge is to now filter results by dates. I only want data to be shown that falls between the Start Date (cell F8) and End Date (cell F10). Of course the additional formula will need to be inserted into every cell that has a formula as each cell is independent and I am now banging my head against the desk.

    Any help will be greatly appreciated.
    Attached Files Attached Files

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

    Re: Adding a date range to an already complex index array forumla

    Hi,

    Quick question to begin with: your profile states 2010 and you've attached an .xlsx file, so I presume that we can replace all those IF(ISERROR... constructions with the much shorter IFERROR()?

    Regards
    Click * below if this answer helped

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

  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: Adding a date range to an already complex index array forumla

    Also, can you clarify that you wish only lines whose Start Date as given in the Training activity tab is between the Start Date and End Date as given in the Financial Year tab to be returned? (There doesn't appear to be an End Date column in the former.)

    Regards

  4. #4
    Registered User
    Join Date
    11-28-2011
    Location
    London, Englan
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Adding a date range to an already complex index array forumla

    Hi, thanks for reading.
    Yes we could potentially change the formula to IFERROR if they would produce the same result, I have just been working with bits of information I have found online and tutorials I have watched and it grew from a standard VLOOKUP to what it currently is at the moment.
    The second comment is correct, the end date is irrelevant, as long as the course has been started between the 2 dates listed on the Financial Year tab then it should be visible.
    Many thanks,

  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: Adding a date range to an already complex index array forumla

    Hi,

    This modification to your array formula in B15 and copied down:

    =IFERROR(INDEX('Training activity'!$A$4:$M$16,SMALL(IF(('Training activity'!$A$4:$A$16=$C$8)*('Training activity'!$D$4:$D$16>=$F$8)*('Training activity'!$D$4:$D$16<=$F$10),ROW('Training activity'!$A$4:$A$16)-MIN(ROW('Training activity'!$A$4:$A$16))+1),ROWS($1:1)),2),"")

    Adjust the column index number accordingly for subsequent column versions.

    Regards

  6. #6
    Registered User
    Join Date
    11-28-2011
    Location
    London, Englan
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Adding a date range to an already complex index array forumla

    Appears to be working like a dream many thanks for your help XOR LX, much appreciated.

    Now on to the next step, fingers crossed.

  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: Adding a date range to an already complex index array forumla

    You're welcome and good luck with the rest.

+ 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. Complex forumla, gurus please help!
    By sifuhall in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-27-2012, 01:23 PM
  2. Adding another condition to an INDEX SMALL array
    By reborn537 in forum Excel General
    Replies: 3
    Last Post: 12-21-2011, 09:27 AM
  3. Index Formula - adding a range condition
    By Henry c in forum Excel General
    Replies: 2
    Last Post: 04-29-2010, 10:19 AM
  4. Need help to add a date range variable to a forumla
    By wv1973 in forum Excel General
    Replies: 5
    Last Post: 10-02-2009, 03:38 PM
  5. Help with complex index array issue
    By kkendall in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-05-2005, 05:15 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