ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find highest number then select next cell (https://www.excelbanter.com/excel-programming/322498-find-highest-number-then-select-next-cell.html)

Mike

find highest number then select next cell
 
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
--
thanks

R.VENKATARAMAN

find highest number then select next cell
 
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

Mike wrote in message
...
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
--
thanks




Max

find highest number then select next cell
 
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

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
Mike wrote in message
...
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
--
thanks




Ken Wright

find highest number then select next cell
 
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 he-

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" wrote in message
...
I want to find the highest number in a column and display the name in the
column to the left of the highest number

--
thanks Mike




--
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" wrote in message
...
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
--
thanks





All times are GMT +1. The time now is 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com