+ Reply to Thread
Results 1 to 8 of 8

Index & Match on Blank Cells

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-18-2013
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Index & Match on Blank Cells

    Hi. Please help on achieving something using Index & Match. Here is the scenario

    B1:B15 = DF0067
    C1:C10 = blank cells
    C11 = XXX
    C12:C15 = blank cells


    A1= INDEX(C1:C15,MATCH(D1,B1:B15),0
    it shows me blank because I think it sees right away DF0067 on B1 with corresponding C1=blank. How do I make it sees C11 value and just ignore blanks? Thank you.

  2. #2
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Index & Match on Blank Cells

    Insert a new column infornt of B (this will then be column B).
    In B1 type:

    =IF(D1="","",C1)

    you can then use this column to look at and return your value.
    Say thanks, click *

  3. #3
    Forum Contributor
    Join Date
    02-18-2013
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Index & Match on Blank Cells

    Sorry Harribone...but your way seems not making sense. And even if I followed it, it will still put me in the same situation.

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Index & Match on Blank Cells

    hi there. you didnt mention what's in D1, used in your INDEX formula. i am guessing it's "DF0067". and it couldn't possibly return a blank unless you custom format it. it either returns a value in column C if found, an #N/A if not, & 0 if the 1st match is a blank. you can try:
    =INDEX(C1:C15,MATCH(1,INDEX((C1:C15<>"")*(B1:B15=D1),),0))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Forum Contributor
    Join Date
    02-18-2013
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Index & Match on Blank Cells

    thank you benishiryo..........it worked perfectly. I appreciated your help. Also thank you too to Harribone for trying to figure out to help me, I appreciated it too. Thank you to both of you.

  6. #6
    Forum Contributor
    Join Date
    02-18-2013
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Index & Match on Blank Cells

    one question though that bothers me....what is that means MATCH(1,INDEX((c1:c15<>"")*(B1:B15=D1) in plain english. Thank you.

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Index & Match on Blank Cells

    (C1:C15<>"")
    this is the 1st logical test. to check if C1:C15 are not blanks. if you select that & press F9 to calculate, you'll get:
    {FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE}

    (B1:B15=D1)
    2nd logical test. to check if B1:B15 is equals to D1. press F9:
    {TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE}

    TRUEs & FALSEs are equivalent to 1s & 0s. so if you multiply them, you'll get:
    {0;0;0;0;0;0;0;0;0;0;1;0;0;0;0}
    only when both logical tests are TRUE will it return 1.

    the INDEX is a magical way of storing these numbers so that it will not be an array formula. if you remove it & put:
    =MATCH(1,(C1:C15<>"")*(B1:B15=D1),0)
    it can still work, but you must press CTRL + SHIFT + ENTER as this is now an array formula.

    so the MATCH formula looks for "1" inside the array i created {0;0;0;0;0;0;0;0;0;0;1;0;0;0;0} & gives you the position of "1". hope that helps

  8. #8
    Forum Contributor
    Join Date
    02-18-2013
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Index & Match on Blank Cells

    Thank you very much benishiryo. I really appreciated your time explaining and making it clear for me. Thank you so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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