Forum Discussion

Captain13's avatar
Captain13
Copper Contributor
Sep 09, 2022
Solved

Subtract based on ranking

Hello, First of all thank you for your assistance in advance your help is much appreciated.   I am trying to use a formulate in order to subtract values in a column based on their lower value in a...
  • HansVogelaar's avatar
    Sep 09, 2022

    Captain13 

    If the values are sorted on rank it's simply a matter of entering

    =A3-A2

    in a cell in row 3, then fill down.

    If the values are not sorted on rank, let's say the values are in A2 and down, and the ranks are in B2 and down.

    Enter the following formula in a cell in row 2, e.g. in C2:

    =IF(B2=MAX($B$2:$B$100),"",A2-INDEX($A$2:$A$100,MATCH(B2+1,$B$2:$B$100,0)))

    and fill down.

Resources