+ Reply to Thread
Results 1 to 4 of 4

Top 5 Strings?

  1. #1
    Registered User
    Join Date
    10-22-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    1

    Top 5 Strings?

    Hi,

    Is there an array formula for eliciting the top five strings by frequency of occurence, not unlike what the LARGE array function does for integers?

    For instance, I might have a list of thousands of alphanumeric codes under column A: how do I figure out what are the top five most frequently occurring codes? (I'm dealing with ISIN codes, if it matters.)

    I realize a similar question has probably been posed here before but I found it difficult-impossible to search...

    *(Also, not necessary and I hate to be a pain, but if you could explain the formula, it might be of great benefit. For instance, this one just confuses me to no end: why do you need the ROW and INDIRECT elements? I've tried it without and it spits out an error:

    Please Login or Register  to view this content.
    )

    Hope you can help!

    Thanks,



    Derek

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Top 5 Strings?

    Something like:
    Arrayformula.
    Please Login or Register  to view this content.
    Kind regards, Harry.

  3. #3
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Top 5 Strings?

    Derek,
    Have a look in the attachment to see if this does what you're looking for.

    p.s.
    Hi Harry!
    Attached Files Attached Files

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

    Re: Top 5 Strings?

    Quote Originally Posted by DekeDirt View Post
    why do you need the ROW and INDIRECT elements?
    Hello Derek, looks like WHER has a good solution for you but specifically to answer your question above.......

    ..... this part

    ROW(INDIRECT("1:10"))

    simply generates an "array" of numbers 1 to 10 like

    ={1;2;3;4;5;6;7;8;9;10}

    INDIRECT isn't strictly required, this will also work

    =SUM(LARGE(Data,ROW(1:10)))

    ....but the 1:10 in that formula can change if you delete/insert rows in the worksheet so INDIRECT is used to make the formula more robust, i.e. to "fix" the values 1 to 10

    If 10 is constant then it's possibly simpler to put that array directly in the formula, i.e. to sum the top 10 values in data

    =SUM(LARGE(Data,{1;2;3;4;5;6;7;8;9;10}))

    That has an added benefit - formula doesn't need to be "array entered"
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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