Rather than VBA, I always use filtering to do this, just selectingunique values as output. It's pretty quick.