+ Reply to Thread
Results 1 to 11 of 11

INDEX/MATCH or Equivalent to Return Data with Blank Cells

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Boston, MA
    MS-Off Ver
    2011
    Posts
    10

    INDEX/MATCH or Equivalent to Return Data with Blank Cells

    Hello -

    I have received help in another thread for using this same workbook. One previous issue was resolved, but I didn't realize that another was created.

    Quick background - I am looking to have cells H14 & I14 return the date when the H:H and I:I column is greater than or equal to 3 (or greater than 2, doesn't matter to me). The H:H and I:I columns are reverse cumulative sums that need to be there. I cleaned them up so that if it's a repeat number, the cell remains blank. This caused an issue for the INDEX/MATCH or LOOKUP or conditional statement (I tried them all, along with forum members help). For example, in the attached workbook, H14 shows 12/21/16... it should return 12/15/16; I14 shows 12/1/16... which is correct. Same formula, different ranges, different result.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Additionally, this is dummy data. I am using the same type of data in a workbook with thousands of rows. I first noticed this problem when I had a large range (10000+), and then went back to look at this dummy data, which still doesn't do exactly what I intended.

    It's not the end of the world if I cant have blank cells and have an INDEX/MATCH, LOOKUP, conditional statement work. The requirement is to return the MAX date when the H:H or I:I column is >=3.

    Additionally, does Excel have some limitation on number of rows/cols that can be used tor INDEX/MATCH?
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    This seems to work...
    =INDEX($A$3:$A$13,MATCH(3,H$3:H$13,-1))
    Note you have calcs set to manual
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Boston, MA
    MS-Off Ver
    2011
    Posts
    10

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    That was quick. Thank you!

    This formula below works great in the dummy data in the workbook I provided. I tried it in my actual document using the formula below tailored to the range {=INDEX($A$3:$A$10000, MATCH(3,AM$3:AM$10000,-1))} and get the #N/A error. Any thoughts why?

    Quote Originally Posted by FDibbins View Post
    This seems to work...
    =INDEX($A$3:$A$13,MATCH(3,H$3:H$13,-1))
    Note you have calcs set to manual

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    As an alternative try array entering
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  5. #5
    Registered User
    Join Date
    07-21-2014
    Location
    Boston, MA
    MS-Off Ver
    2011
    Posts
    10

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    This also works great on the workbook I provided. Thank you.

    This also, unfortunately, returns the #N/A when I use it in the context of my document.

    {=INDEX($A$3:$A$10000,MATCH(2,1/((AM3:AM10000>=3)*(AM3:AM10000<>"")),1))}

    Any thoughts on how to make this work using the larger range?

    If it helps, I really only need the rows to be a particular date range (today through 90 days in the past). The A column is the dates. Is there a way to make the rows populate based on the date to reduce the range? (i.e. if row 3456 is 90 days ago, is there some way to write the formula to say A3456:A____ whatever today's date is) Maybe some way to incorporate ROW() to reduce the range if it's necessary?

    Quote Originally Posted by FlameRetired View Post
    As an alternative try array entering
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    If it works on your dummy data but not your real data, then can you provide some more realist data to test against?
    (btw, my formula was a regular formula, not an array formula, no need to enter using CSE)

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    The formula should work on the larger range.

    Have you array entered it (Ctrl + Shift + Enter) and is there any value in AM3:AM10000 >= 3? If not that would return #N/A.

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,911

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    Or try ...

    =LOOKUP(10^307,$A$3:$A$13/(H3:H13>=3)/(H3:H13<>""))

  9. #9
    Registered User
    Join Date
    07-21-2014
    Location
    Boston, MA
    MS-Off Ver
    2011
    Posts
    10

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    Quote Originally Posted by FDibbins View Post
    If it works on your dummy data but not your real data, then can you provide some more realist data to test against?
    (btw, my formula was a regular formula, not an array formula, no need to enter using CSE)
    As I was providing a larger data set, I realized my mistake (I asked the formula to look at the wrong range). Both the solutions from yourself and FlameRetired, as well as Phuocam all work.

    Quote Originally Posted by FlameRetired View Post
    The formula should work on the larger range.

    Have you array entered it (Ctrl + Shift + Enter) and is there any value in AM3:AM10000 >= 3? If not that would return #N/A.
    Yes, I did enter it as an array. I made a mistake and asked the formula to look at the wrong range. That's my fault . Problem solved, thank you all for the help!

    Quote Originally Posted by Phuocam View Post
    Or try ...

    =LOOKUP(10^307,$A$3:$A$13/(H3:H13>=3)/(H3:H13<>""))
    This also works great. Thank you!

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    Good deal. Thanks for the feedback and added rep.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: INDEX/MATCH or Equivalent to Return Data with Blank Cells

    Good stuff, thanks for the feedback

+ 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. 2-dimensional index match, return nth non-blank value?
    By JMB10101 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-29-2016, 01:55 AM
  2. [SOLVED] IF <=0 INDEX MATCH LARGE otherwise return blank
    By augr in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 11-14-2016, 05:34 PM
  3. Index/ Match Formula, How to return blank cell as a blank not 0
    By MDResearcher in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-24-2016, 08:40 PM
  4. INDEX and MATCH functions to sum data with blank cells
    By Simplex06 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-14-2013, 08:38 AM
  5. [SOLVED] Equivalent of an index match but return all values that meet the criteria
    By Brumbot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2013, 04:32 AM
  6. Index/Match to return a blank cell
    By Nick_in_Dubai in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-26-2012, 06:36 AM
  7. Replies: 2
    Last Post: 10-21-2011, 01:41 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