Sorry I am unable to understand your further requirement which you posted in Post #5

You can adjust the range and use the UDF formula at anywhere in the workbook.