Hello again!
I've spent a good portion of the last few work days searching this site and others in an effort to streamline the way we set up our spreadsheets, and I've had quite a bit of luck on here so far. I have one more idea that would make things perfect if there's a way to get it to work, but I hit a road block.
I'm still largely a VBA newbie, as in our department, it's best if we can avoid it altogether, and I pride myself on being able to do as much as I currently can without it. In this case, however, it would be insanely clunky to go about it without UDFs.
So here's what I need: A function that returns the name of the named formula that calls the function. A funky parent-referencing function. A bizarre version of ROW(), I guess.
Something along the lines of:
Function FuncX() As String
FuncX = NameOfActiveFormula
End Function
So putting "=blarg" in a cell, where the name "blarg" = 1&FuncX()&2, the cell would read "1blarg2"
I don't even know if the "active formula" is something that gets stored in Excel's memory.
There will be multiple names using this structure within a single cell, if that's important.
So far I've figured out how to get a named formula's name by calling a function and passing a string matching its name, but that's not terribly useful. I've also figured out how to return a named formula's "refers to" as a string by calling a function and passing a string matching its name. I feel like these two functions might come in handy at some point in this process, but I'm not certain. Point is, both of these functions need an argument, and I need one that doesn't.
If it did indeed work, obviously it wouldn't work on its own, it would only work when a named formula is calling it... but that's all I need. Any ideas? If it's just plain not possible, that's a-okay, I just don't want to stop trying until I know for sure!
An important note: There are no named ranges being used, only named formulas that don't refer to any specific cell(s), and I would prefer it to stay that way, but it's not out of the question.
Thanks so much for your time!
Bookmarks