Results 1 to 3 of 3

Thread: =max query

  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    =max query

    =max(range) returns the max value. Fair enough.
    But what's the quickest way to then go to the cell that contains this value? (other than using ctrl F)

    ps andrew- the missing $ did the trick... <img src=/S/threadhead.gif border=0 alt=threadhead width=28 height=31>

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: =max query

    You could use a VBA procedure like this:

    <pre>Public Sub GoToMax()
    Dim dMax As Double
    Dim oCell As Range, oMaxCell As Range
    For Each oCell In Selection
    If IsNumeric(oCell.Value) Then
    If oMaxCell Is Nothing Then
    dMax = oCell.Value
    Set oMaxCell = oCell
    Else
    If oCell.Value > dMax Then
    dMax = oCell.Value
    Set oMaxCell = oCell
    End If
    End If
    End If
    Next oCell
    If Not oMaxCell Is Nothing Then oMaxCell.Select
    End Sub
    </pre>


    Select the cells you want to go to the max in and run the macro.
    Legare Coleman

  3. #3
    Lounger
    Join Date
    Nov 2002
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: =max query

    Couldn't you use Match(Max(range) to find it's location then index it? Something like
    Index(Match(Max(range))) to get what is there - not a good example but an idea?

    Bob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •