Max Value Across Worksheets Returning Sheet Name

B

bambier

I have a productivity spreadsheet, where I track the productivity
numbers for a number of individuals. Each worksheet ("tab" if you
prefer) is a different persons name.

Each tab has columns for: A: week#, B: time, items, C: errors, D:
items per hour, E: accuracy.

I know I can find the max value across the sheets by using:
=MAX('1st:End'!D3), but that doesn't tell me which person achieved
that number.

I'd be happy with it either returning the tab name, or the contents of
cell A1.
 
G

Guest

You could use a macro:-

Sub marine()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Select
Maximum = Range("D3").Value
If Maximum > Top Then
Top = Maximum
thename = ActiveSheet.Name
End If
Next ws
MsgBox ("The top seller with " & Top & " Units was " & thename)
End Sub


Mike
 
G

Guest

To return the sheet index containing the largest value try:

=MATCH(1,FREQUENCY(MAX('1st:End'!D3),'1st:End'!D3),0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top