+ Reply to Thread
Results 1 to 7 of 7

Using INDEX MATCH formula to return values that will skip blank cells

  1. #1
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Using INDEX MATCH formula to return values that will skip blank cells

    In the attached excel file, I have a index match formula in cell B2 to return an approximate value for the input date in cell B1. It returns the value I would expect from the data set, ignoring the blank cells. I expanded the data in cells E6-I18 and have another formula in cell F2 that returns the appropriate value if the data set has no blank cells. I have similar data in columns L thru P, but I made cells N10 & N11 blank for dates 1/1/2002 & 1/1/2003. I want a formula that will return the value of 13 from date 1/1/2001 with an input date of 2/15/2003 and GP = 3 and Band = 2 and not return a value of zero from the blank cell for date 1/1/2003. I tried combining the formulas from cells B2 & F2 to produce a new formula in cell M2 that returns the correct value, but I had to include if/then statements to reference the correct columns. The entire data set that I will be working with is about 30 columns wide, so I do not want to write a formula with that many if/then statements included in the index match formula. Any ideas on how to simplify the formula in cell M2 to be more dynamic for an expanded set of data?
    Attached Files Attached Files

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

    Re: Using INDEX MATCH formula to return values that will skip blank cells

    This took a couple of helper cells to develop but it comes down to this array formula:

    =IF(INDEX(L8:P18,MATCH(M1,L8:L18,1),M4+1)=0,INDEX(L8:P18,MATCH(0,LEN(OFFSET(L8:L18,0,M4)),0)-1,M4+1),INDEX(L8:P18,MATCH(M1,L8:L18,1),M4+1))

    Essentailly it says if the normal INDEX/MATCH yields other than zero, use the normal INDEX / MATCH.

    Otherwise, do this: INDEX(L8:P18,MATCH(0,LEN(OFFSET(L8:L18,0,M4)),0)-1,M4+1)

    Which is find the first row in Column M4 + 1 that has a zero length value and use the row above it.
    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
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Using INDEX MATCH formula to return values that will skip blank cells

    ARRAY formula in M2

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Using INDEX MATCH formula to return values that will skip blank cells

    Thank you. Exactly what I wanted.

  5. #5
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Using INDEX MATCH formula to return values that will skip blank cells

    I found out I need to add a couple more criteria for "product" and "state" and these need to be in columns unlike the "GP" and "Band" that are in rows. How do I update the formula in cell D2 for extra column A and column B that have been added with their inputs in cells D5 and D6. The correct result for the formula in cell D2 should be 13 instead of 23 after adding the extra columns. Attaching new spreadsheet.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Using INDEX MATCH formula to return values that will skip blank cells

    Try this
    ARRAY formula in D2

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-03-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    22

    Re: Using INDEX MATCH formula to return values that will skip blank cells

    Works great! Thank you.

+ 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] INDEX/MATCH or Equivalent to Return Data with Blank Cells
    By bcathell in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-28-2017, 01:57 PM
  2. Index Match Skip Blank rows
    By choth21 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-10-2016, 01:19 AM
  3. [SOLVED] Help with an Index Match formula so that it return values in order (dates)
    By michelle 1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-23-2016, 11:40 AM
  4. 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
  5. [SOLVED] Go to right thru a range and skip all blank cells, return value of first non-blank in rang
    By mysticmoron109 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-16-2015, 03:47 PM
  6. Replies: 2
    Last Post: 02-20-2015, 05:23 PM
  7. index match, ..... skip result if blank value ...... jump to next match
    By gehawk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2013, 04:42 AM

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