+ Reply to Thread
Results 1 to 4 of 4

Creating a top five list from an Array

  1. #1
    Registered User
    Join Date
    12-30-2014
    Location
    Dublin Ireland
    MS-Off Ver
    2007
    Posts
    12

    Creating a top five list from an Array

    Hi folks,

    I created an array of transactions from a dataset I have of over 5000 rows. The array works great to get the total transactions etc but I need to put the top 5 transactions (in terms of value) from this array into a table format. I will need two tables, one for Redemptions and one for subscriptions. The array element that determines if the transaction is a subscription or redemption is transarray(n,9) and the value of the transaction is stored in transarray(n,6)

    I used the below code to get the top value but don't know how to the next four. Any help is greatly appreciated -

    Please Login or Register  to view this content.
    Last edited by gablet; 02-07-2015 at 03:20 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Creating a top five list from an Array

    This sounds like a job for Excel's function: LARGE( array, n )

    x.gif

  3. #3
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Creating a top five list from an Array

    Sorry, using LARGE(array,n) would give you the n-th largest value, not the actual row or index number of that record.
    I would recommend sorting the data set, and then selecting the top 5 rows.
    You may also want to add a column with the record numbers of each row so that another sort by that column would restore the original order.
    Just a few thoughts.
    -Stu

  4. #4
    Registered User
    Join Date
    12-30-2014
    Location
    Dublin Ireland
    MS-Off Ver
    2007
    Posts
    12

    Re: Creating a top five list from an Array

    I'll give it a go and come back if I have any problems. thanks 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. [SOLVED] Creating a list without duplicates or array formula
    By darq in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-11-2014, 04:46 AM
  2. Replies: 2
    Last Post: 06-01-2011, 07:43 AM
  3. Creating a 2-dimensional array from a 1-dimensional list
    By guywithcamera in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2008, 06:34 PM
  4. Creating a list from a larger array
    By telton in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2008, 08:19 PM
  5. Creating a concatenate text list by referencing an array
    By nothingbutjeep in forum Excel General
    Replies: 0
    Last Post: 05-30-2006, 04:50 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