I was looking for something just like what you posted. Thanks. It works great.

So far the only change I made was to change the count parameter to be a boolean flag for replace 1st or replace all.