I have a series of drop-down lists. Most of them are populated with named ranges. However, sometimes, the criteria changes, and they need to be populated with a custom list. I have it set up currently where I have off-screen formulas. If a cell includes a semicolon, then I assume I need to build a custom range. So, the next 50 cells are devoted to turning the semicolon-delimited list into a range that can be used for the data validation. So, my data validation formulas are rather complex:
For this example, WW10 contains either the name of the range or a semicolon-delimited list of values that should be present in the range. So, XD10 is a formula to count the number of semicolons in WW10. If it is 0, then that means that it is just a range name, and INDIRECT(WW10) returns that range. But, if it is a semicolon-delimited list, then I build that list dynamically starting from XK10 to however far out I need to go to the right. I can then copy this down and the validation formula updates automatically for the hundred and fifty rows that I need this validation for. Each row has ten of these potentially dynamic lists. It is rare they will be populated by a dynamic list, so for the most part, the formulas are not needed. So, multiplying out, that is 150x10x51=76,500 cells with formulas. And at first, this was no big deal. But, over time I have had to add additional copies of this same sheet, each with similar formulas. The workbook is starting to slow down. Is there a way to replace all of this manual manipulation with a UDF that could use
If that returned a range, that would potentially solve all of my problems. I would not need 76,500 formulas per page, which I think has the potential to speed things up a bit. At this point, I would be able to remove close to a million formulas if that were the case (out of the million, maybe a thousand are actually being used for this purpose). So, is there a way to return a Range object that does not actually point to a range, but makes Excel think that it does?
Attached is a simple example of the current functionality.
Edit: Since a UDF referenced from a cell cannot update another range, this may not be possible.
Bookmarks