+ Reply to Thread
Results 1 to 13 of 13

Add a date lookup to index Match formula

  1. #1
    Registered User
    Join Date
    08-14-2018
    Location
    Valrico, Florida
    MS-Off Ver
    Excel 2013
    Posts
    9

    Add a date lookup to index Match formula

    Hi,
    I have the array formula below that is working correctly.

    =IFERROR(INDEX('Roadmap'!$H:$H,MATCH(1,($A$3='Roadmap'!$D:$D)*(C$3='Roadmap'!$E:$E),0))&"","No Content Found")

    What I need to do is add one additional lookup criteria that I can't quite figure out.

    On the Roadmap tab there Column B = Start date and Column C = End Date.
    The formula needs to look at the date in Cell B1 and find the row where the date is equal to or between Roadmaps column B & C.

    I tried the below but it doesn't work. HELP!!!

    =IFERROR(INDEX('Roadmap'!$H:$H,MATCH(1,($A$3='Roadmap'!$D:$D)*(C$3='Roadmap'!$E:$E)*(AND(B1>='Roadmap'!B:B,B1<='Roadmap'!C:C)),0))&"","No Content Found")

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Add a date lookup to index Match formula

    I've found that array formulas don't work well with AND(this, that). To get array formulas to work, you have to nest the IF Statements


    Try something like this:
    =IFERROR(INDEX('Roadmap'!$H:$H,MATCH(1,($A$3='Roadmap'!$D:$D)*(C$3='Roadmap'!$E:$E)*(B1>='Roadmap'!B:B)*(B1<='Roadmap'!C:C)),0))&"","No Content Found")
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    08-14-2018
    Location
    Valrico, Florida
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Add a date lookup to index Match formula

    thank you dflak- but the formula seems to be only picking up "B1>='Roadmap'!B:B" and not "B1<='Roadmap'!C:C".

    Example: on Roadmap tab
    ...........Column B....Column C....Column H
    Row 1.. 8/10/18...... 8/12/18..... Picture
    Row 2.. 8/13/18...... 8/15/18...... Image

    Change the date in B1:
    When I use the date 8/09/18, I get nothing - good
    When I use the date 8/10/18, I get Picture - good
    When I use the date 8/13/18, I get Picture - this should be Image
    Last edited by Just_Hooch; 08-15-2018 at 09:54 AM.

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Add a date lookup to index Match formula

    Looks like 1 of the closing parentheses is wrong, try this instead.

    =IFERROR(INDEX('Roadmap'!$H:$H,MATCH(1,($A$3='Roadmap'!$D:$D)*(C$3='Roadmap'!$E:$E)*(B1>='Roadmap'!B:B)*(B1<='Roadmap'!C:C),0))&"","No Content Found")

    Using full columns in an array formula is a bad habit to get into. If you only have 1000 rows of data in your file then you're calculating over 1000000 empty rows that you don't need to.

    Also you can speed it up by using approximate instead of liner match.

    =IFERROR(INDEX('Roadmap'!$H:$H,MATCH(2,1/(($A$3='Roadmap'!$D:$D)*(C$3='Roadmap'!$E:$E)*(B1>='Roadmap'!B:B)*(B1<='Roadmap'!C:C))))&"","No Content Found")

    But the empty rows will be the biggest slowdown.
    Last edited by jason.b75; 08-15-2018 at 10:25 AM.

  5. #5
    Registered User
    Join Date
    08-14-2018
    Location
    Valrico, Florida
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Add a date lookup to index Match formula

    Still end up with the same issue though I did convert the roadmap tab to a table so that should fix the time issue.

    =IFERROR(INDEX(Roadmap[Media],MATCH(1,($A$3=Roadmap[Module])*(C$3=Roadmap[Module Content])*((B1>=Roadmap[Start Date])*(B1<=Roadmap[Stop Date])),0))&"","No Content Found")

  6. #6
    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,036

    Re: Add a date lookup to index Match formula

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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

  7. #7
    Registered User
    Join Date
    08-14-2018
    Location
    Valrico, Florida
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Add a date lookup to index Match formula

    Attached is a sample of the spreadsheet. The formulas we are discussing is on the Marketing Tab in cell B4:C8, then repeats for each section.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Add a date lookup to index Match formula

    That shows us the problem but not what is expected.

    To make sure I have the logic right before trying this.

    Compare B2 to start date and stop date
    Compare A3 (then A10, A17, etc) to the Module column.
    Compare B3:C3 (B10:E10, B17:G17, etc) to Module Component.

    Find the row where all ove the above match, then

    Compare A4:A8, (A11:A15, A18:A22, etc) to the Roadmap column headings in F1:O1

    and get the result from that column.

    Have I got that right?

  9. #9
    Registered User
    Join Date
    08-14-2018
    Location
    Valrico, Florida
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Add a date lookup to index Match formula

    That is correct.

    (Date in B1 not B2)

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Add a date lookup to index Match formula

    In that case

    =IFERROR(INDEX(Roadmap[[Theme]:[JIRA Status]],MATCH(2,1/(($A$3=Roadmap[Module])*(B$3=Roadmap[Module Component])*($B$1>=Roadmap[Start Date])*($B$1<=Roadmap[Stop Date]))),MATCH($A4,Roadmap[[#Headers],[Theme]:[JIRA Status]],0))&"","No Content Found")

    Array confirmed with Shift Ctrl Enter.

    However, you should note that you may not get the expected results in many cases because your headers do not match, in Roadmap you have 'First Call To Action (CTA) Copy' but in Marketing you have 'First Call to Action'

    The formula will not see these as the same.

  11. #11
    Registered User
    Join Date
    08-14-2018
    Location
    Valrico, Florida
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Add a date lookup to index Match formula

    Jason.b75- I ran into a snag.

    It was requested that I also pull the dates into the Marketing tab. I updated the formula to the below but my result for the date fields are unformatted. The cell format is "Date" however the result is still showing as 43325. I am guessing that becasue this is an array formula the result is being read by Excel as text but I'm not sure how to modify the formula to correct for that.

    =IFERROR(INDEX(Roadmap[[Start Date]:[JIRA Status]],MATCH(2,1/(($C$3=Roadmap[Module])*('Dropdown Values'!$B$2=Roadmap[Module Component])*($C$2>=Roadmap[Start Date])*($C$2<=Roadmap[Stop Date]))),MATCH($B9,Roadmap[[#Headers],[Start Date]:[JIRA Status]],0))&"","No Content Found")

  12. #12
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Add a date lookup to index Match formula

    Just remove &"" from near the end of the formula, that is what is converting any numbers in the results to text.

  13. #13
    Registered User
    Join Date
    08-14-2018
    Location
    Valrico, Florida
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Add a date lookup to index Match formula

    Again thank you. YOU ROCK!!

+ 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] need formula match lookup with INDEX and MATCH
    By mazan2010 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-04-2017, 03:01 PM
  2. Lookup, Match, Index formula help
    By eddiej90 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2016, 06:11 AM
  3. Index + Match + Lookup -- return next largest date
    By bgoodsell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2015, 05:48 PM
  4. Lookup / Index Match formula help
    By markhp in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2015, 11:03 AM
  5. [SOLVED] Need help with LOOKUP or INDEX/MATCH formula
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-30-2014, 01:38 PM
  6. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  7. Formula using Lookup or index/match
    By Bpd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-15-2014, 04:16 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