+ Reply to Thread
Results 1 to 4 of 4

Is there a rankif function

  1. #1
    Dan
    Guest

    Is there a rankif function

    I want to rank a column only if another column value is equal to something.
    Does anyone know a workaround for this, I know there is no rankif.

    Example below:
    column 1 column 2
    h 2
    h 3
    a 1
    a 5

    I want a formula to tell me the rank of column 2 depending on column 1
    being true.

  2. #2
    Bernie Deitrick
    Guest

    Re: Is there a rankif function

    Dan,

    =1+SUMPRODUCT(($A$2:$A$5=A2)*($B$2:$B$5>B2))

    and copy down.

    HTH,
    Bernie
    MS Excel MVP


    "Dan" <[email protected]> wrote in message
    news:[email protected]...
    > I want to rank a column only if another column value is equal to

    something.
    > Does anyone know a workaround for this, I know there is no rankif.
    >
    > Example below:
    > column 1 column 2
    > h 2
    > h 3
    > a 1
    > a 5
    >
    > I want a formula to tell me the rank of column 2 depending on column 1
    > being true.




  3. #3
    Dan
    Guest

    Re: Is there a rankif function

    It does not seem to work with the following data set... Or does it?

    acet 89
    acet 76
    acet 42
    acet 62
    pro 82
    pro 81
    pro 54
    pro 4
    oxy 73
    oxy 94
    oxy 52




    "Bernie Deitrick" wrote:

    > Dan,
    >
    > =1+SUMPRODUCT(($A$2:$A$5=A2)*($B$2:$B$5>B2))
    >
    > and copy down.
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Dan" <[email protected]> wrote in message
    > news:[email protected]...
    > > I want to rank a column only if another column value is equal to

    > something.
    > > Does anyone know a workaround for this, I know there is no rankif.
    > >
    > > Example below:
    > > column 1 column 2
    > > h 2
    > > h 3
    > > a 1
    > > a 5
    > >
    > > I want a formula to tell me the rank of column 2 depending on column 1
    > > being true.

    >
    >
    >


  4. #4
    Dan
    Guest

    Re: Is there a rankif function

    Gotit!!! Thanks Bernie, I use the sumproduct to get multiple sumifs, but
    this is cool, I did not think of using it this way.

    "Bernie Deitrick" wrote:

    > Dan,
    >
    > =1+SUMPRODUCT(($A$2:$A$5=A2)*($B$2:$B$5>B2))
    >
    > and copy down.
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Dan" <[email protected]> wrote in message
    > news:[email protected]...
    > > I want to rank a column only if another column value is equal to

    > something.
    > > Does anyone know a workaround for this, I know there is no rankif.
    > >
    > > Example below:
    > > column 1 column 2
    > > h 2
    > > h 3
    > > a 1
    > > a 5
    > >
    > > I want a formula to tell me the rank of column 2 depending on column 1
    > > being true.

    >
    >
    >


+ 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