Yes it works in the sample workbook, but I'm getting a 'NAME#' error in my actual workbook.

Can I email you my actual workbook?