+ Reply to Thread
Results 1 to 14 of 14

Index min with multiple results, excluding zero's

  1. #1
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Index min with multiple results, excluding zero's

    Hi - I have s light issue with a formulae - it does work but I would like to expand it:

    =INDEX(DATAPR1FIRM,MATCH(MIN(IF(DATAPR1HOURLY>0,DATAPR1HOURLY)),DATAPR1HOURLY,0))

    I wanted to know how I would expand that formulae to get multiple results i.e. the formulae above locates the lowest value and pulls a corresponding cell (excluding zero's) but how would I get the second lowest and the third etc. If I need to create a new post please let me know. many thanks

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Index min with multiple results, excluding zero's

    You need to look into SMALL(IF for this.

    Or post a sample workbook and we can show you how.


    BSB

  3. #3
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Index min with multiple results, excluding zero's

    Ok - ill upload - please give me five mins

  4. #4
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Index min with multiple results, excluding zero's

    I hope this helps - many thanks
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Index min with multiple results, excluding zero's

    I have tried this but of alas it does not work -

    =INDEX(DATAPR1ALL,SMALL(IF((DATAPR1HOURLY>0,DATAPR1HOURLY)),ROW(DATAPR1ALL)-MIN(ROW(DATAPR1ALL))+1),ROWS(AY$68:AY68)),1)

    P

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Index min with multiple results, excluding zero's

    this is similar to this?

    FIRM REGION MinHR
    Firm 2 Edinburgh
    100
    Firm 3 Manchester
    234
    Firm 1 London
    500
    Firm 1 Leeds
    600

  7. #7
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Index min with multiple results, excluding zero's

    Yes - so the ideal result would be
    Firm 2 100
    Firm 3 234
    Firm 1 500
    Firm 1 600
    P

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Index min with multiple results, excluding zero's

    I understand - without region?

    FIRM MinHR
    Firm 2
    100
    Firm 3
    234
    Firm 1
    500
    Firm 1
    600


    Done with PowerQuery aka Get&Transform (built-in feature in Excel 2016 Pro)
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Index min with multiple results, excluding zero's

    Hi - Thanks for the upload but there does not seem to be formulas behind the list you created. I also need to pull region or any other adjacent cell.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Index min with multiple results, excluding zero's

    PowerQuery doesn't contain any formulas or VBA
    and you show post#8 so I did it
    what else you want?

    if you want to see how it was done go to the ribbon - Data - Show Queries then double click on table on the right side and if you want find there in the PowerQuery Editor - Advanced Editor

    With PowerQuery you need to change point of view.
    Last edited by sandy666; 07-04-2018 at 04:31 PM.

  11. #11
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Index min with multiple results, excluding zero's

    I am so sorry I seemed to have angered you. I really have not seen anything like what you have produced before so I would not know how to replicate it and I need to do that on multiple areas in the worksheet. I was just looking for a formulae as I think BadlySpelledBuoy was trying to achieve. Thank you for your help though - much appreciated.

    P

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Index min with multiple results, excluding zero's

    I prefer life easier
    but if you prefer formula, good luck

    have a nice day

    edit:
    btw. if you want to see PQ "formula", here is

    Please Login or Register  to view this content.
    Last edited by sandy666; 07-04-2018 at 04:46 PM.

  13. #13
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Index min with multiple results, excluding zero's

    Paste the below formula into G3 then highlight G3 down to G26, press F2 then press Ctrl+Shift+Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Repeat for columns H & I but chance DFIRM for DREGION and DHOURLY respectively.

    Or with a helper column to make dealing with duplicate values nice and easy

    See attachments.

    BSB
    Last edited by BadlySpelledBuoy; 07-05-2018 at 04:51 AM.

  14. #14
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Index min with multiple results, excluding zero's

    Thanks to BadlySpelledBuoy - the solution works brilliantly with a helper column. Thanks once again!

+ 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. Replies: 3
    Last Post: 02-06-2018, 07:46 AM
  2. [SOLVED] Lookup to match multiple criteria and return multiple results excluding duplicates.
    By kris3012 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-13-2018, 11:06 AM
  3. [SOLVED] Index Match Multiple results
    By kashifshahzad in forum Excel General
    Replies: 7
    Last Post: 03-21-2017, 11:14 AM
  4. Multiple searches with Multiple Results (MATCH INDEX)
    By kharding15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2016, 04:14 PM
  5. How to row multiple results from multiple sheets using INDEX/MATCH.
    By ljprodigy18 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-25-2015, 06:32 PM
  6. [SOLVED] Index, Small, Row issue with Multiple Values and need Multiple Results
    By jmantn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-13-2014, 05:17 PM
  7. INDEX matching multiple criteria with multiple results
    By Montanes in forum Excel General
    Replies: 4
    Last Post: 06-21-2011, 04:38 PM

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