+ Reply to Thread
Results 1 to 3 of 3

Index matching multiple columns

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2013
    Posts
    118

    Question Index matching multiple columns

    Hello,

    This seems easy, or at least like it should've been answered, but I can't find it. I need a formula that looks at cell a1, searches for it in B:B, and returns the value in C:C. simple enough, but there are some caveats:
    -B:B most likely contains multiple instances of the string in A1
    -All but one of those instances above will have a number in C:C, and that's what I want to return.
    -I need an array index formula because this will be taking the list in C:C and essentially shortening it

    Ex.
    fffg...0
    ggh...0
    ggh...42
    ggh...0
    sjkj...5

    So if a1 contained ggh, I want D1 to be 42.
    Last edited by weeble33; 07-24-2012 at 02:56 PM.

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Index matching multiple columns

    Hello,

    try any of these with CTRL+SHIFT+ENTER,

    =VLOOKUP(A1,IF(C2:C100>0,B2:C100),2,0)

    =INDEX(C2:C100,MATCH(1,IF(B2:B100=A1,IF(C2:C100>0,1)),0))
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2013
    Posts
    118

    Re: Index matching multiple columns

    The vlookup gave me a #value error when putting it in. But the index seems to be working great! I don't know why I always forget about nested ifs...And here I was trying to get and() to handle arrays.

    thank you

+ 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