The table at the bottom contains the data and I will try to describe the issue in detail.
I have a column called labor type that can have up to 10 different labor type entries and to the right of each entry is space for up to 10 names for each labor type. The user can edit the names and the labor types. After they make any changes, there is a macro that defines each row of 10 entries as a named range with the labor type (Welder, Plumber, etc.) as the name. I do this so that I can use dropdowns with the indirect function referencing the named range.
If they change the names, there is no problem but if they change the labor type, I end up with both the new and the old labor types as named ranges after the macro runs. This causes problems with some of the data validation that is used on other tabs.
So, I would like the macro to delete the old named ranges. I've found code to delete all named ranges, all with errors, etc. but I have many other named ranges in the workbook and on the same sheet that I don't want deleted. What I want is for the code to delete named ranges only if the named ranges are within D1:N11.
All help is appreciated.
Tracy
I have a column called labor type that can have up to 10 different labor type entries and to the right of each entry is space for up to 10 names for each labor type. The user can edit the names and the labor types. After they make any changes, there is a macro that defines each row of 10 entries as a named range with the labor type (Welder, Plumber, etc.) as the name. I do this so that I can use dropdowns with the indirect function referencing the named range.
If they change the names, there is no problem but if they change the labor type, I end up with both the new and the old labor types as named ranges after the macro runs. This causes problems with some of the data validation that is used on other tabs.
So, I would like the macro to delete the old named ranges. I've found code to delete all named ranges, all with errors, etc. but I have many other named ranges in the workbook and on the same sheet that I don't want deleted. What I want is for the code to delete named ranges only if the named ranges are within D1:N11.
All help is appreciated.
Tracy
Labor Type | Personnel Qualified to Perform Role to Left |