If the numbers to rank are in A1:A5 and "preferred ranks" are in B1:B5 then use this formula in C1 copied down

=RANK(A1,A$1:A$5,1)+SUMPRODUCT((A$1:A$5=A1)*(B$1:B$5<B1))