Forum Discussion
Captain13
Sep 09, 2022Copper Contributor
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...
- Sep 09, 2022
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.
OliverScheurich
Sep 09, 2022Gold Contributor
=INDEX($A$2:$A$7,MATCH(D2,$B$2:$B$7,0))-INDEX($A$2:$A$7,MATCH(D2-1,$B$2:$B$7,0))
You can try this formula.
Captain13
Sep 09, 2022Copper Contributor
Thank you for your response, this solution also helped.. have a good weekend!