+ Reply to Thread
Results 1 to 7 of 7

Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

  1. #1
    Registered User
    Join Date
    06-02-2013
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    16

    Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    Hi gurus,

    I recently asked about finding the nth largest value, when there are duplicate n-1, n-2 etc values. Ramananhrm was able to quickly solve it for me - see this thread:

    However, I've now found that the solution doesn't work when there are blank cells in the range. In my case blank cells are both ="" cells and actually blank cells.

    Can anyone build on Ramananhrm's solution so that it can handle those scenarios?

    Many thanks
    Last edited by Bobneil; 08-28-2013 at 12:00 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    Hi Bobneil,

    Please try this file.
    Attached Files Attached Files
    Please click 'Add reputation', if my answer helped you.

  3. #3
    Registered User
    Join Date
    06-02-2013
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    Hi Ramanan,

    Thanks again for a great response. Your solution works perfectly on the example that I originally proposed. However, I’m having trouble now taking your solution and implementing it in my spreadsheet. My data is across the page instead of down, which must be affecting the ROW part of your solution. I’ve tried replacing it with COLUMN but it wasn’t that simple.

    In addition, my formula will end up using OFFSET to refer to the data array, and I’m not sure if that’s now going to affect the solution. I suspect it will though.

    I’ve added these two scenarios into your spreadsheet – “Data transposed” is just transposing the data and my feeble attempt to adjust the formula. “Data transposed & Offset” is the type of offset situation I need to implement this with.

    Unfortunately your formula’s are now well above my skill level and so I’m struggling to understand their magic and troubleshoot myself!

    Thanks again
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    Hi Bobneil,

    Rows as seperated with Semi-colon (';') & columns with Comma (',')
    You have to make/align the range as (Horizontal - Horizontal) or (Row - Row).
    For that you have to use the 'Transpose' function. Thats the logic.

    Please try this file.

    Note: I have used the name manager to select the flexible range for the 3rd scenario

    Name: Flexi_range
    Formula: =INDEX(Sheet1!$B$19:$G$21,MATCH(Sheet1!$B$23,Sheet1!$A$19:$A$21,0),0)
    Attached Files Attached Files
    Last edited by ramananhrm; 08-28-2013 at 01:32 AM.

  5. #5
    Registered User
    Join Date
    06-02-2013
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    Hi Ramanan,

    Sorry I feel like each time you help me I change what I need. I'm used to being able to change these to suit, but I'm still just copying your work without fully understanding it.

    Anyway, the next challenge with this is attached. Basically the named range needs to be able to handle the formula being copied down to reference different Lists. I've attached what I mean.

    Thanks again

    130828 Bobneil_New solution v3.xlsx

  6. #6
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    If you modify the name range, then you will get the result.

    Press Ctrl+F3 > Edit the range

    Old: =INDEX(Sheet1!$B$19:$G$21,MATCH(Sheet1!$A$24,Sheet1!$A$19:$A$21,0),0)
    New: =INDEX(Sheet1!$B$19:$G$21,MATCH(Sheet1!$A24,Sheet1!$A$19:$A$21,0),0)


    Regards
    Last edited by ramananhrm; 08-28-2013 at 02:22 AM.

  7. #7
    Registered User
    Join Date
    06-02-2013
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    Thank you very much. Very patient and helpful with this, and very sophisticated solutions. Most appreciated.

  8. #8
    Registered User
    Join Date
    06-02-2013
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Find nth largest value, when there are duplicate n-1, n-2 etc values AND blank cells

    BTW if anyone can give Ramanan a hit of reputation for these posts, I'd appreciate it. Helped me last time so forum won't let me double up on the stars.

+ 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. [SOLVED] Need to find if duplicate values exist in a column, concatenate cells and then delete
    By Siemieniuk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-22-2017, 07:22 PM
  2. [SOLVED] Find nth largest value, when there are duplicate n-1, n-2 etc values
    By Bobneil in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2013, 03:31 AM
  3. [SOLVED] Find Largest Values Greater than 'X' in VBA
    By mabeaver in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2012, 03:47 PM
  4. find largest values, then return corresponding row values.
    By neurotypical in forum Excel General
    Replies: 7
    Last Post: 05-24-2006, 05:27 PM
  5. How to blank out cells with duplicate values?
    By Bleu_808 in forum Excel General
    Replies: 8
    Last Post: 05-02-2006, 05:20 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