Check for the existence of a named range on a specific worksheet of the current workbook
Posted on 2011-09-03
I would like to check ...
... for the existence of a workbook level name (MyDataRange) in the current workbook.
... if Found the macro will check on which worksheet the workbook level name exists:
(1) if the named range is NOT located on the worksheet named 'DATA',
... a msgbox will tell the user the name of the worksheet including the cell references and the ... the macro will afterwards DELETE the workbook level name (MyDataRange). Afterwards the macro is to exit.
(2) If the named range IS located on the worksheet named 'DATA' a msgbox will say so including specifying the cell references of the named range
... if the workbook level name 'MyDataRange' does NOT EXIST at all, a msgbox is to say so and the macro is to exit.
Help is much appreciated. Thank you very much for your professional help in advance.