I'm trying to create a formula (although I think it will need to be a macro). The table has 2 columns, column one has percentages. What needs to happen is whichever 3 rows have the lowest percentage column 2 needs to be changed to -3,-2 and -1. If a percentage is over 3% then make column 2 be 1. I have the over 3% working but not the bottom 3 percentages. Anyone point me in the right direction? Thanks!
Since you've only got three levels to compare (min,max and middle), I think this can be accomplished with a nested if statements.
The rules I got from the above are: there three options: min which should be -1, max which should be -3 and middle which should be -2, unless the value is over 3%, then the value should be 1.
=if(a1 = min(A1:A3);(if (a1 > 3% ; 1; -1));if (a1 = max(A1:A3); (if(a1 > 3%; 1; -3));if(a1 > 3%; 1; -2))
The first if check for a min value, and then checks for the magic value of 3%. The else checks for the max value, then checks for the magic value. If it makes it to the second else, then its got to be the middle value. Compare it to the magic value of 3% and your done.