+ Reply to Thread
Results 1 to 5 of 5

searching

Hybrid View

  1. #1
    Tracy A
    Guest

    searching

    I have two columns. I want to search the first column for the largest number
    and return the value in the next cell.

    Then I would like to search the first column for the second largest number
    and return the value in the next cell.

    I would like to do this without sorting the data!!

    Is this possible?


  2. #2
    Tom Ogilvy
    Guest

    Re: searching

    For the cell below
    =Offset(A1,Match(Large(A:A,1),A:A,0),0)

    =Offset(A1,Match(Large(A:A,2),A:A,0),0)

    for the cell to the Right
    =Offset(A1,Match(Large(A:A,1),A:A,0)-1,1)

    =Offset(A1,Match(Large(A:A,2),A:A,0)-1,1)

    If the first and second numbers are equal, then this will give the wrong
    answer.

    --
    Regards,
    Tom Ogilvy

    "Tracy A" <Tracy A@discussions.microsoft.com> wrote in message
    news:110211DC-276F-4D7E-B7D8-44FDD9DFF449@microsoft.com...
    > I have two columns. I want to search the first column for the largest

    number
    > and return the value in the next cell.
    >
    > Then I would like to search the first column for the second largest number
    > and return the value in the next cell.
    >
    > I would like to do this without sorting the data!!
    >
    > Is this possible?
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: searching

    For the cell below
    =Offset(A1,Match(Large(A:A,1),A:A,0),0)

    =Offset(A1,Match(Large(A:A,2),A:A,0),0)

    for the cell to the Right
    =Offset(A1,Match(Large(A:A,1),A:A,0)-1,1)

    =Offset(A1,Match(Large(A:A,2),A:A,0)-1,1)

    If the first and second numbers are equal, then this will give the wrong
    answer.

    --
    Regards,
    Tom Ogilvy

    "Tracy A" <Tracy A@discussions.microsoft.com> wrote in message
    news:110211DC-276F-4D7E-B7D8-44FDD9DFF449@microsoft.com...
    > I have two columns. I want to search the first column for the largest

    number
    > and return the value in the next cell.
    >
    > Then I would like to search the first column for the second largest number
    > and return the value in the next cell.
    >
    > I would like to do this without sorting the data!!
    >
    > Is this possible?
    >




  4. #4
    Domenic
    Guest

    Re: searching

    To take ties into consideration, assuming that Column A contains your
    numbers and you want to return the corresponding value in Column B,
    try...

    C1, copied down:

    =INDEX($B$1:$B$100,MATCH(LARGE($A$1:$A$100-ROW($A$1:$A$100)/10^10,ROWS($C
    $1:C1)),$A$1:$A$100-ROW($A$1:$A$100)/10^10,0))

    ....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

    Hope this helps!

    In article <110211DC-276F-4D7E-B7D8-44FDD9DFF449@microsoft.com>,
    "Tracy A" <Tracy A@discussions.microsoft.com> wrote:

    > I have two columns. I want to search the first column for the largest number
    > and return the value in the next cell.
    >
    > Then I would like to search the first column for the second largest number
    > and return the value in the next cell.
    >
    > I would like to do this without sorting the data!!
    >
    > Is this possible?


  5. #5
    Domenic
    Guest

    Re: searching

    To take ties into consideration, assuming that Column A contains your
    numbers and you want to return the corresponding value in Column B,
    try...

    C1, copied down:

    =INDEX($B$1:$B$100,MATCH(LARGE($A$1:$A$100-ROW($A$1:$A$100)/10^10,ROWS($C
    $1:C1)),$A$1:$A$100-ROW($A$1:$A$100)/10^10,0))

    ....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

    Hope this helps!

    In article <110211DC-276F-4D7E-B7D8-44FDD9DFF449@microsoft.com>,
    "Tracy A" <Tracy A@discussions.microsoft.com> wrote:

    > I have two columns. I want to search the first column for the largest number
    > and return the value in the next cell.
    >
    > Then I would like to search the first column for the second largest number
    > and return the value in the next cell.
    >
    > I would like to do this without sorting the data!!
    >
    > Is this possible?


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1