+ Reply to Thread
Results 1 to 4 of 4

Retrieving highest revenue, AND associated salesman

  1. #1
    Registered User
    Join Date
    06-26-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    40

    Retrieving highest revenue, AND associated salesman

    I'm trying to ask a complicated question in a simple way. If you had the following table, how would you retrieve the salesman with the highest revenue? Note that I want the Revenue value AND the Salesman's name. Obviously, I could create a Pivot table with a max value on Revenue, but how to get the associated salesman as well?

    Division Salesman Revenue
    A Jones 100
    A Smith 50
    A Davis 250
    A Samuels 600
    A Shaugnessy 350
    A Wildstein 425
    B Feldman 50
    B Bailey 275
    B Potts 300
    B Dawkins 400
    B Measley 125

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Retrieving highest revenue, AND associated salesman

    Here's one method.

    A B C D E F
    1 Division Salesman Revenue Max
    2 A Jones
    100
    Salesman Revenue
    3 A Smith
    50
    Samuels
    600
    4 A Davis
    250
    5 A Samuels
    600
    6 A Shaugnessy
    350
    7 A Wildstein
    425
    8 B Feldman
    50
    9 B Bailey
    275
    10 B Potts
    300
    11 B Dawkins
    400
    12 B Measley
    125

    Worksheet Formulas
    Cell Formula
    E3 =INDEX(B:B,MATCH(MAX(C:C),C:C,0))
    F3 =MAX(C:C)
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    06-26-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Retrieving highest revenue, AND associated salesman

    OK, that's good start. I should have specified that I'm doing this in a macro, and I also want the best salesman BY DIVISION.

    Chris

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Retrieving highest revenue, AND associated salesman

    in case of ties
    A
    B
    C
    D
    E
    F
    1
    Division Salesman Revenue Max
    2
    A Jones
    100
    Salesman Revenue
    3
    A Smith
    50
    Davis
    600
    4
    A Davis
    600
    Samuels
    5
    A Samuels
    600
    Feldman
    6
    A Shaugnessy
    350
    7
    A Wildstein
    425
    8
    B Feldman
    600
    9
    B Bailey
    275
    10
    B Potts
    300
    11
    B Dawkins
    400
    12
    B Measley
    125


    E
    F
    2
    Salesman Revenue
    3
    =IF(ROWS($A$1:A1)>COUNTIF($C$2:$C$25,MAX($C$2:$C$25)),"",INDEX($B$2:$B$25,MATCH(LARGE(INDEX(($C$2:$C$25=$F$3)*(1/ROW($A$2:$A$25)),0),ROWS($A$1:A1)),INDEX(($C$2:$C$25=$F$3)*(1/ROW($A$2:$A$25)),0),0)))
    =MAX(C2:C25)
    4
    =IF(ROWS($A$1:A2)>COUNTIF($C$2:$C$25,MAX($C$2:$C$25)),"",INDEX($B$2:$B$25,MATCH(LARGE(INDEX(($C$2:$C$25=$F$3)*(1/ROW($A$2:$A$25)),0),ROWS($A$1:A2)),INDEX(($C$2:$C$25=$F$3)*(1/ROW($A$2:$A$25)),0),0)))
    5
    =IF(ROWS($A$1:A3)>COUNTIF($C$2:$C$25,MAX($C$2:$C$25)),"",INDEX($B$2:$B$25,MATCH(LARGE(INDEX(($C$2:$C$25=$F$3)*(1/ROW($A$2:$A$25)),0),ROWS($A$1:A3)),INDEX(($C$2:$C$25=$F$3)*(1/ROW($A$2:$A$25)),0),0)))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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. Revenue recognition and deffered revenue
    By saurabhwise in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-08-2013, 11:12 AM
  2. [SOLVED] Difference between total revenue - last days revenue
    By vinodt in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-08-2012, 02:35 PM
  3. Replies: 6
    Last Post: 07-12-2012, 06:13 AM
  4. Retrieving the Darts Player Who Scored the Highest Peg
    By Ghostcoy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-09-2010, 10:59 AM
  5. [SOLVED] Retrieving the Player Who Scored the Highest Number of Points
    By Elmar Wolfstetter in forum Excel General
    Replies: 9
    Last Post: 04-08-2010, 11:17 AM

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