Results 1 to 2 of 2

Counting values in list and displaying top 3

Threaded View

  1. #1
    Registered User
    Join Date
    10-16-2007
    Posts
    7

    Counting values in list and displaying top 3

    Hello,

    I have three lists of data on one sheet in Excel 2002. They are Name, Location, and Client. Lets say they are in columns A, B, and C. Each row contains information about a sale.

    Ex.
    Dave Florida MiniMart
    Mark New York BigMart


    I am trying to write a macro that will look at each column independently, count the number of times a value appears, and then display the top three values. So if Dave's name appears 5 times, Mark's 1 time, and Susan's 3 time, the macro will output their names onto a different worksheet in the order

    Dave
    Susan
    Mark

    and ideally with the counted value next to them

    Dave 5
    Susan 3
    Mark 1


    I've tried using a pivot table and the auto filter, but those seem to look at the whole row as a discreet value and I want it to ignore the other columns. So eventually it would look something like this:

    Dave 5 Florida 4 BigMart 6
    Susan 3 Illinois 3 SmallMart 2
    Mark 1 New York 2 MidMart 1


    For an added challenge, the primary list will be updated with new data every time there is a sale so the macro should first look to see how many entries are in each column and make sure it captures all of them before it runs. And if you'd really like to be my hero, I'd like the macro to run automatically whenever the second worksheet (the statistics page) is selected.

    Thank you so much to whomever can help me!

    Sincerely,

    ChronicFear


    ***Also posted here: http://www.ozgrid.com/forum/showthread.php?t=78455
    Last edited by ChronicFear; 10-16-2007 at 04:56 PM.

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