Thanks for trying to help! I solved the problem with a macro instead. THat seemed to be the only way not to geta circular reference and to sort the list based on to values or more.