### SiblingRank

The numeric rank of siblings within a hierarchy branch.

Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list. If you were to sort the list, the rank of the number would be its position.

Sample 1:

Given a list of numbers, find each number’s Sibling Rank:

Number |

1 |

2 |

3 |

4 |

5 |

6 |

7 |

8 |

9 |

10 |

List of numbers.

Steps:

1. Sort the numbers in descending order.

Number |

10 |

9 |

8 |

7 |

6 |

5 |

4 |

3 |

2 |

1 |

Sorted numbers in descending order.

2. The highest number automatically gets the first position with the sibling rank = 1

3. Assign the position as the value of the Sibling Rank

The second highest number equal to 9 gets the second position or sibling rank = 2

The third highest number equal to 8 gets the third position or sibling rank = 3

Repeat this process until there is only one item left.

4. The lowest number automatically gets the last position equal to the number of items or Sibling Rank = 10.

Sample 2:

Given a set of numbers V to Z, the Sibling Ranks are as shown below:

V |
W |
X |
Y |
Z |
Sibling Rank V |
Sibling Rank W |
Sibling Rank X |
Sibling Rank Y |
Sibling Rank Z |

1 |
1 |
1 |
1 |
10 |
10 |
10 |
10 |
10 |
1 |

2 |
2 |
2 |
2 |
9 |
8 |
9 |
9 |
9 |
2 |

2 |
3 |
3 |
3 |
8 |
8 |
8 |
8 |
8 |
3 |

4 |
5 |
4 |
4 |
7 |
7 |
6 |
7 |
7 |
4 |

5 |
5 |
5 |
5 |
6 |
6 |
6 |
6 |
6 |
5 |

6 |
6 |
6 |
6 |
5 |
5 |
5 |
5 |
5 |
6 |

7 |
7 |
7 |
7 |
4 |
4 |
4 |
2 |
4 |
7 |

8 |
8 |
7 |
8 |
3 |
2 |
2 |
2 |
3 |
8 |

8 |
8 |
7 |
9 |
2 |
2 |
2 |
2 |
2 |
9 |

10 |
10 |
10 |
10 |
1 |
1 |
1 |
1 |
1 |
10 |

The first five fields from the left to the right are the sample fields, and the last five fields are the results.

In the case were duplicate items exists in the list. The duplicate items will have the same rank, and the rank will be the position of the first occurrence of the duplicated items. The position where the next duplicate entries fall will no longer be used as a rank and will be skipped.

In the above example, column V has duplicate entries for the numbers 8 and 2. The resulting column Sibling Rank V shows item 8 has a sibling rank of 2, and position 3 was skipped as a rank. Item 2 has a rank of 8, and position 9 was also skipped as a rank.