Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jun 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding Highest 5 (Windows 98)

    In the attached spreadsheet, I have a list of 10 people ID's, and corresponding procedures with a count of total procedures. How can I find the top 5 highest on countofproc for each people id? Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Finding Highest 5 (Windows 98)

    Create a query based on your table with the following SQL. Replace Sheet2 with the name of the table:

    SELECT T.[Person ID], T.Proc, T.CountOfProc
    FROM [Sheet2] AS T
    WHERE T.CountOfProc In (SELECT TOP 5 CountOfProc FROM [Sheet2] WHERE [Person ID] = T.[Person ID] ORDER BY CountOfProc DESC)
    ORDER BY T.[Person ID], T.CountOfProc DESC;

  3. #3
    New Lounger
    Join Date
    Jun 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Finding Highest 5 (Windows 98)

    Thank you!! It worked perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •