+ Reply to Thread
Results 1 to 10 of 10

Complicated Index Match

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Manhattan, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    17

    Complicated Index Match

    I tried posting this problem on here last week and didn't get a valid solution so I figured I would try again.

    I need to display the last text value in a column ignoring blank cells based on a different column. And to make it a little more complicated there are multiple columns which the text could appear in. I am struggling to accurately describe the formula I need, but I have attached an example of the problem.

    The current formula I have finds the last text value in one column but if the last occurance of the person's name is next to a blank cell it displays a 0 instead of the last text value.

    {=INDEX($D$3:$D$12,MATCH(MAX(IF(($C$3:$C$12=$K3),$B$3:$B$12,"")),$B$3:$B$12,0))}

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Complicated Index Match

    In L3 try
    Please Login or Register  to view this content.
    and pull down as needed

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    Manhattan, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Complicated Index Match

    Pepe Le Mokko, that worked, but not quite how I want it to. This displays the value next to the last occurance of the name, but if it is blank I need it to still display the previous value. And also, if there are two values for different people on the same line it will display both values next to one person's name.

  4. #4
    Registered User
    Join Date
    09-02-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Complicated Index Match

    hi willia,

    I took your formula and did some modification. not sure if it is what you are looking for.

    Please Login or Register  to view this content.
    hope it helps.
    Last edited by Hyperdude; 11-14-2012 at 05:04 AM.
    Regards,
    Hyperdude

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Complicated Index Match

    =IF(ISBLANK(INDEX($D$3:$D$12,MATCH(1,($C$3:$C$12=I3)*(ISTEXT($D$3:$D$12)+ISTEXT($F$3:$F$12)),1))),INDEX($F$3:$F$12,MATCH(1,($C$3:$C$12=I3)*(ISTEXT($D$3:$D$12)+ISTEXT($F$3:$F$12)),1)),INDEX($D$3:$D$12,MATCH(1,($C$3:$C$12=I3)*(ISTEXT($D$3:$D$12)+ISTEXT($F$3:$F$12)),1)))

    This formula does not show correct for Matt because its empty. Otherwise it would show the las entered text

  6. #6
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Complicated Index Match

    ok
    This array formula shows all correctly
    =IFERROR(IF(ISBLANK(INDEX($D$3:$D$12,MATCH(MAX(($C$3:$C$12=I3)*B3:B12),B3:B12,0))),INDEX($F$3:$F$12,MATCH(MAX(($C$3:$C$12=I3)*B3:B12),B3:B12,0)),INDEX($D$3:$D$12,MATCH(MAX(($C$3:$C$12=I3)*B3:B12),B3:B12,0))),"")

  7. #7
    Registered User
    Join Date
    10-26-2012
    Location
    Manhattan, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Complicated Index Match

    Hyperdude, this is close to what I need. Thank you. The only issue is that if there is a blank for someone for one column it displays an error instead of the other column where there is an entry. And, I don't need both columns displayed just the most recent of the two. If both need to be displayed then that will work but if there is a way to only display the most recent between the two columns then that would be preferred.

    I am seeing what I can figure out using what you have here and so far haven't figured out a way to fix the problem.

    Thanks again.

  8. #8
    Registered User
    Join Date
    10-26-2012
    Location
    Manhattan, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Complicated Index Match

    eisayew, I also tried out yours but it doesn't seem to reference column E at all which causes some problems in the value it displays. What I am looking for is a formula which finds the person's name in C, then displays the last text value from column D adjacent to the person's name in C. Then look for the same person in column E, display the last text value from column F associated with that person. But then compare those two values and only display the one that occurred last. See the attachment for an example of what the desired results should be.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-26-2012
    Location
    Manhattan, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Complicated Index Match

    Hyperdude, by adding an IFERROR() to each of the INDEX() MATCH() sections I got it to display "None & Half" instead of the error. So by adding that in I can make it work I think. If you can think of a way to only display the last one of those two that would be perfect. Here is the formula I have now:

    =CONCATENATE(IFERROR(INDEX($D$3:$D$12,MATCH(MAX(IF($C$3:$C$12=$K3,IF($D$3:$D$12="","",$B$3:$B$12),"")),$B$3:$B$12,0)),"None")," & ",IFERROR(INDEX($F$3:$F$12,MATCH(MAX(IF($E$3:$E$12=$K3,IF($F$3:$F$12="","",$B$3:$B$12),"")),$B$3:$B$12,0)),"None"))

    Thank you again!

  10. #10
    Registered User
    Join Date
    10-26-2012
    Location
    Manhattan, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Complicated Index Match

    Figured it out! Thank you everyone for the help and guidance on how to accomplish this complex task!

+ 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