Skip to content

Instantly share code, notes, and snippets.

@akanik
Last active October 1, 2018 16:48
Show Gist options
  • Save akanik/c3171b2d3335465324ab3baf1e119209 to your computer and use it in GitHub Desktop.
Save akanik/c3171b2d3335465324ab3baf1e119209 to your computer and use it in GitHub Desktop.
excel ranking equation
# Equation looks to see if there are ties, if ties exist,
# then it skips the next ranking number so your last ranking
# number corresponds with the actual number of actual things
# you're ranking.
# This equation allows for up to a 4-way tie.
# Column E holds the values you're comparing to create the
# rank and Column F is where you're putting this equation
=if(and(E5<E4,F4=F3,F4=F2,F4=F1),F4+4,if(and(E5<E4,F4=F3,F4=F2),F4+3,if(and(E5<E4,F4=F3),F4+2,if(E5<E4,F4+1,if(E5=E4,F4,"error")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment