+ Reply to Thread
Results 1 to 6 of 6

Issue with LARGE, MATCH, INDEX and duplicates, multiple conditions

  1. #1
    Registered User
    Join Date
    01-05-2017
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel for Mac 14.1
    Posts
    3

    Issue with LARGE, MATCH, INDEX and duplicates, multiple conditions

    Hey all: having a pretty common problem with using LARGE to find the 6 biggest recent transactions in raw data from a bank feed; trying to match transaction descriptions but INDEX MATCH and VLOOKUP all just take the top result.

    I made progress with the solution posted in this forum thread...

    http://www.excelforum.com/excel-form...uplicates.html

    ...and managed to get the first half of the initial IF formula to register "FALSE."

    =IF(COUNTIF(M$27:M32,M32)=1,INDEX(mint!C:C,MATCH(LARGE(IF(mint!E:E="debit",IF(mint!G:G="Walnut-XXX4",mint!D:D)),6),mint!D:D,0)))

    However, my original formula contains 2 nested IFs:

    =INDEX(mint!C:C,MATCH(LARGE(IF(mint!E:E="debit",IF(mint!G:G="Walnut-XXX4",mint!D:D)),5),mint!D:D,0))

    ...and I am struggling to figure out how to plug those conditions into the 2nd half of the initial IF formula as posted on the linked thread above:

    INDEX($A$50:$A$65,SMALL(IF($B$50:$B$65=B4,ROW($B$50:$B$65)-ROW($B$49),""),COUNTIF(B$3:B4,B4))))

    Any and all help greatly appreciated!

  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,926

    Re: Issue with LARGE, MATCH, INDEX and duplicates, multiple conditions

    Hi, welcome to the forum

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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
    01-05-2017
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel for Mac 14.1
    Posts
    3

    Re: Issue with LARGE, MATCH, INDEX and duplicates, multiple conditions

    Thanks FDibbins! After another hour of banging my head against the screen I think I solved this. I'm sure I'll have another question soon and will use a dummy workbook at that time.

    Thanks!

  4. #4
    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,926

    Re: Issue with LARGE, MATCH, INDEX and duplicates, multiple conditions

    Cool, can you share your answer with us please?

  5. #5
    Registered User
    Join Date
    01-05-2017
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel for Mac 14.1
    Posts
    3

    Re: Issue with LARGE, MATCH, INDEX and duplicates, multiple conditions

    Sure!

    =IF(COUNTIF(mint!D:D,M27)=1,INDEX(mint!C:C,MATCH(LARGE(IF(mint!E:E="debit",IF(mint!G:G="Walnut-XXX4",mint!D:D)),1),mint!D:D,0)),INDEX(mint!C:C,SMALL(IF(mint!D:D=M27,ROW(mint!D:D),""),COUNTIF(mint!D:D,M27))))

    Turns out I didn't need to include the nested IFs in the 2nd half of the equation (which is giving the FALSE value for the initial IF formula). As explained by JosephP in the linked thread above (http://www.excelforum.com/excel-form...uplicates.html), the FALSE equation:

    INDEX(mint!C:C,SMALL(IF(mint!D:D=M27,ROW(mint!D:D),""),COUNTIF(mint!D:D,M27))))

    ...seems to work just fine. If it bugs out I may return!

  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,926

    Re: Issue with LARGE, MATCH, INDEX and duplicates, multiple conditions

    Great, always a good feeling when you work it out yourself

+ 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. INDEX/MATCH with =LARGE is giving duplicates
    By keith740 in forum Excel General
    Replies: 6
    Last Post: 10-07-2015, 03:35 AM
  2. Replies: 2
    Last Post: 12-18-2014, 09:52 AM
  3. [SOLVED] index-match/vlookup issue with duplicates
    By yks in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-13-2014, 10:26 AM
  4. [SOLVED] Problem Using LARGE formula with Index/Match to pull values when there are Duplicates
    By BDavis in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-11-2014, 02:23 PM
  5. [SOLVED] Large,Index, Match with duplicates
    By x65140 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2014, 10:45 AM
  6. Replies: 13
    Last Post: 12-13-2012, 11:44 AM
  7. Index/Match with Conditions and Duplicates
    By ddapcn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-09-2012, 03:50 AM

Tags for this Thread

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