Update Rankings

I want this to run so that when i = 2,3,4, and 5 rank to be 2 and when 
seconds are not equal (1,6,and 7) for it to produce the value of j