+ Reply to Thread
Results 1 to 6 of 6

Dividing list into quintiles, returning a value but ignoring blanks.

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    10

    Dividing list into quintiles, returning a value but ignoring blanks.

    Hi all,
    I have ranked a large list of data and I´m now trying to sort them into quintiles. Basically I need a function that returns a 1 if a value is in the top 20%, 2 for the next 20% and so on. The range has several blank cells which are not to be counted.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Dividing list into quintiles, returning a value but ignoring blanks.

    Could you post some dummy sample data?
    If I've been of help, please hit the star

  3. #3
    Registered User
    Join Date
    04-25-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Dividing list into quintiles, returning a value but ignoring blanks.

    Here is an example. B1:B17 is what I need a function for. (In my case the range is J1:J6578)
    In this exaple the range/# of ranks is divisible by 5, but this might not be the case for later ranges as the selection varies.

    ------A(Rank) B(Quintile)
    1-----4--------------2
    2-----Blank
    3-----Blank
    4-----7--------------4
    5-----1--------------1
    6-----9--------------5
    7-----Blank
    8-----3--------------2
    9-----Blank
    10----8--------------4
    11----2--------------1
    12----Blank
    13----6--------------3
    14----Blank
    15----10-------------5
    16----Blank
    17----5--------------3
    Last edited by maxfiesta; 05-06-2013 at 12:30 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Dividing list into quintiles, returning a value but ignoring blanks.

    Here's one way of doing it. It's a little scruffy, but it's effective

    Change the range length in the small lookup table (the yellow cells) to fit your real data.
    The quintile values will adjust themselves depending on the values in your data and it then uses VLOOKUP to put the right quintile number next to the values.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Dividing list into quintiles, returning a value but ignoring blanks.

    An alternative is
    In F1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    then insert this formula:
    =IF(J2="","",ROUNDUP(J2/$F$1*5,0))
    Please click the * icon below if I have helped.

  6. #6
    Registered User
    Join Date
    04-25-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Dividing list into quintiles, returning a value but ignoring blanks.

    Thanks a lot! Really appreciate your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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