Thank you Andrew, Fredrik and Bengt. This is exactly what I was looking. I actually have a moderate size test file (400k) so if I get to it, I'll post comparison times for the different methods suggested. David