That's pretty much what I want, but I want the function to select al the relevant columns and not just 1 column. Shan