+ Reply to Thread
Results 1 to 12 of 12

Index Small using Or

  1. #1
    Forum Contributor
    Join Date
    06-17-2015
    Location
    Norwich, England
    MS-Off Ver
    2016 (Office 365)
    Posts
    103

    Index Small using Or

    Hi

    I'm looking to build a list of customers ( Col N) looking for the value C3 and then also either 'not' paid' or 'payment not found' in Col AA

    This is what I thought would work but it just gives me the first value in the table

    INDEX(dgts_current!$A$3:$N$10000,SMALL(IF(OR((dgts_current!$N$3:$N$10000=$C$3)*(dgts_current!$AA$3:$AA$10000="not paid"),(dgts_current!$N$3:$N$10000=$C$3)*(dgts_current!$AA$3:$AA$10000="payment not found")),ROW(dgts_current!$N$3:$N$10000)),ROW(1:1))-2,1)

    Any ideas - I think I'm close?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Index Small using Or

    Try

    =INDEX(dgts_current!$A$3:$N$10000,SMALL(IF((((dgts_current!$AA$3:$AA$10000="payment not found")+(dgts_current!$AA$3:$AA$10000="not paid"))*(dgts_current!$N$3:$N$10000=$C$3),ROW(dgts_current!$N$3:$N$10000)),ROW(1:1))-2,1)

  3. #3
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Index Small using Or

    not quite
    INDEX(dgts_current!$A$3:$N$10000, AGGREGATE(15,6, ROW(dgts_current!$N$3:$N$10000)/(dgts_current!$N$3:$N$10000=$C$3)/ISNUMBER(SERCH(“not “,dgts_current!$AA$3:$AA$10000)), ROW(1:1))-2,1)
    not array formula

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Index Small using Or

    I see you already have some answers, but just to explain.......OR doesn’t do what you want here because it returns a single result FALSE if none of the conditions are satisfied for any of the cells in both of your ranges.....or TRUE if as few as 1 cell satisfies the conditions. You need an array result with a value for each row, so using + normally gives you that - AND works in a similar way to OR, so in that case you’d use * to simulate AND
    Audere est facere

  5. #5
    Forum Contributor
    Join Date
    06-17-2015
    Location
    Norwich, England
    MS-Off Ver
    2016 (Office 365)
    Posts
    103

    Re: Index Small using Or

    Thanks - this gives me a #Name? result (I changed SERCH to SEARCH)?

  6. #6
    Forum Contributor
    Join Date
    06-17-2015
    Location
    Norwich, England
    MS-Off Ver
    2016 (Office 365)
    Posts
    103

    Re: Index Small using Or

    Hi - thanks but this gives me a "...contains an error" message

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,411

    Re: Index Small using Or

    Andy - it's not clear whom you are addressing in your last two replies, but #NAME? suggests that one of the functions used isn't available in Excel 2007 or is misspelt.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Index Small using Or

    No error with this version of Tim's formula ..

    =IFERROR(INDEX(dgts_Current!$A$3:$N$10000, AGGREGATE(15,6, ROW(dgts_Current!$N$3:$N$10000)/(dgts_Current!$N$3:$N$10000=$C$3)/ISNUMBER(SEARCH(“not “,dgts_Current!$AA$3:$AA$10000)), ROW(1:1))-2,1),"")

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  9. #9
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Index Small using Or

    Give this try in your formula.

    =INDEX(dgts_current!$A$3:$N$10000,SMALL(IF((dgts_current!$N$3:$N$10000=$C$3)*((dgts_current!$AA$3:$AA$10000="not paid")+(dgts_current!$AA$3:$AA$10000="payment not found")),ROW(dgts_current!$N$3:$N$10000)),ROW(1:1))-2,1)

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  10. #10
    Forum Contributor
    Join Date
    06-17-2015
    Location
    Norwich, England
    MS-Off Ver
    2016 (Office 365)
    Posts
    103

    Re: Index Small using Or

    Thanks Ali - the reply was to Tim who offered the option with SERCH in it - I corrected that to SEARCH but still got the 'name' error - will keep trying with this.

  11. #11
    Forum Contributor
    Join Date
    06-17-2015
    Location
    Norwich, England
    MS-Off Ver
    2016 (Office 365)
    Posts
    103

    Re: Index Small using Or

    Many thanks Shukla - this seems to do the trick!

  12. #12
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Index Small using Or

    Happy to help you and thanks for feedback

+ 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, max, small, if
    By donnIeDorian in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-02-2016, 01:57 PM
  2. index, max, small, if
    By donnIeDorian in forum Excel General
    Replies: 1
    Last Post: 07-31-2016, 04:53 AM
  3. index with small
    By mena in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2016, 09:02 AM
  4. [SOLVED] Index() Small() Row()
    By Shakeel Ahmad in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2015, 12:36 AM
  5. Match Index, Small Index with Concatenate
    By kharding15 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-30-2015, 05:38 PM
  6. INDEX SMALL and ROW
    By MAG27 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-11-2015, 09:59 PM
  7. INDEX and SMALL help
    By markgilmore in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-02-2015, 01:02 PM

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