Ben, I'd encourage you to write that function up and post it to the UDF forum. It will be harder to find if you just leave it in here.