# Formula for employees with highest sales

MAX VLOOKUP pivot table

### #1 JohnF

JohnF

Newbie

• Members
• 1 posts

Posted 26 May 2014 - 04:15 PM

I have a workbook with 5 sheets. Each sheet 2 through 5 is a different store. Sheets 2 through 5 have different employees’ names in a1:a5 and their total sales in b1:b5. On sheet 1 I want the highest sales amount of each sheet (2-5) in b1:b5 and the name of each employee beside the employee’s total sales amount in  a1:a5. Sheet 1 will list the top 4 employees of the 4 stores and their sales amount.

Thank you

### #2 Jonathan

Jonathan

• 887 posts

Posted 26 May 2014 - 09:04 PM

Hi John,

There are at least two different ways that you could do this.  The 'simple' way would be to use the MAX function to extract the maximum sales from each of your worksheets and then the VLOOKUP function to extract the name of the employee with the same number of sales.  If there are two employees "tied" for the top sales, this will extract the first employee.

For a full explanation of the MAX function, see the video lesson: Expert Skills Lesson 3-2: Use common functions with Formula AutoComplete.

For detailed instructions on using the VLOOKUP function, see the video lesson: Expert Skills Lesson 3-22: Use a VLOOKUP function for an exact lookup.

I have attached an example workbook showing this approach:

An alternative approach would be to store all of your data in a single worksheet and then use pivot tables to analyze and display it.

For a complete run-down of pivot tables, see the video lessons in: Expert Skills Session Five: Pivot Tables.

Pivot tables are more complex, but they offer more flexibility in analyzing data. I have attached another example workbook extracting the totals using pivot tables:

I hope this information is useful to you.  Please feel free to reply if you have any more questions about implementing this.

Jonathan is part of the professional team who answer Excel-related questions posted on the ExcelCentral.com forums.
Jonathan also tests our courses prior to publication and has worked on all of our ten world bestselling Excel books for Excel 2007, Excel 2010, Excel 2013, Excel 2016 for Windows and Excel 2016 for Apple Mac. Jonathan has also worked on over 850 video lessons for or video courses covering Excel 2007, Excel 2010 and Excel 2013.
As well as extensive Excel knowledge, Jonathan has worked in the IT world for over thirteen years as a programmer, database designer and analyst for some of the world's largest companies.

### Also tagged with one or more of these keywords: MAX, VLOOKUP, pivot table

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users