Thanks for the reply nathan, in excel I get a "type mismatch" error on

if r.value="" then
Any thoughts?