Hi FDibbins! Thanks a lot for your response. There won't be any duplicates in the list, so that's no problem, but I can't get it working. When I put the formula you wrote in D1, it says that this formula contains a mistake (or something in that way, I have a Czech language version), and I have no idea what the mistake can be. Could you have a look, whether the formula is correct to fill in D1?