Display rank based on numerical field

How to display rank with numerical field. I am trying with cell index but i can get it for a repeating cell but not able to sort for a input element.