Hi Simon
Thanks for the reply. cause there are around a hundred losses and I need to select some of them based on a certain criterion. By using the normal way, I have to change the code every time the criterion changes.