Thanks so much, that looks like it works perfectly! Now I'll try to adapt it for my big spreadsheet