thank you so much for taking the time to do this...this is the function i have been looking for.....additional question how do I repeat the function on a different row say A24 on the same sheet