RankEQ formula by group

Hi,

I'm hoping to make the RankEQ formula have a criteria component to the ranking to rank overtime on deck per shift instead of by the whole group. We keep all the information on a larger spreadsheet and have a ranked report available to all staff.

The column headers are below:

Thanks for any help!

Tags:

Best Answers

  • Toufong Vang
    Toufong Vang ✭✭✭✭✭
    Answer ✓

    RANKEQ([OT Hours]@row, COLLECT([OT Hours]:[OT Hours], Shift:Shift, Shift@row))

    Hi, @Amelia Retureta, the formula above will do that. Here's how it works:

    Use COLLECT() to return the range of OT Hours for the shift. Having retrieved the range, use RANKEQ() to rank the current value within it.

    Cheers!

  • Amelia Retureta
    Amelia Retureta ✭✭✭✭
    Answer ✓

    Hi @Toufong Vang

    That worked great, I only had to add the ,1 between the ending parenthesis to rank lowest to highest.

    RANKEQ([OT Hours]@row, COLLECT([OT Hours]:[OT Hours], Shift:Shift, Shift@row), 1)

    Thanks for your help!

Answers

  • Toufong Vang
    Toufong Vang ✭✭✭✭✭
    Answer ✓

    RANKEQ([OT Hours]@row, COLLECT([OT Hours]:[OT Hours], Shift:Shift, Shift@row))

    Hi, @Amelia Retureta, the formula above will do that. Here's how it works:

    Use COLLECT() to return the range of OT Hours for the shift. Having retrieved the range, use RANKEQ() to rank the current value within it.

    Cheers!

  • Amelia Retureta
    Amelia Retureta ✭✭✭✭
    Answer ✓

    Hi @Toufong Vang

    That worked great, I only had to add the ,1 between the ending parenthesis to rank lowest to highest.

    RANKEQ([OT Hours]@row, COLLECT([OT Hours]:[OT Hours], Shift:Shift, Shift@row), 1)

    Thanks for your help!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!