find highest number then select next cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I want excel to find the highest number in a column, Which i have done, but
i want it to display the name in the column to its left instead of the
highest number
 
try this sub assuming your data is in D3 to D13


Public Sub test()
Range("a1").Activate
Dim value As Single
value = WorksheetFunction.Max(Range("d3:d13"))

Cells.Find(what:=value).Activate
ActiveCell.Offset(0, -1) = ActiveCell

End Sub

perhaps better solutions may be forthcoming
 
Assuming the col with the numbers is col B,
with the names in col A, one col to the left

Put in say, C1:
=OFFSET($B$1,MATCH(MAX(B:B),B:B,0)-1,-1)

C1 will return the name with the highest number in col B

(It's also assumed that there won't be duplicate
highest numbers in col B)

Adapt to suit
 
If if if if if you can be sure there is only ONE value equal to the max,
then with your values in Col B and required data in Col A

=INDEX(A1:A30,MATCH(MAX(B1:B30),B1:B30,0))

If more than one match possible then take a look at Aladin's post here:-

http://tinyurl.com/64mz3

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

Mike said:
I want to find the highest number in a column and display the name in the
column to the left of the highest number
 

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

Similar Threads

Vlookup Function 1
Macro storing as a date? 11
Count the highest number of days without “errors” 2
2nd highest value. 1
How to order numbers 4
Classification 6
Userform sorting data 4
Highlight Highest number 8

Back
Top