Nesting Named Expressions?

I just discovered named expressions (very useful!), but I’m wondering if there’s a way to nest them.

For example, if I have one that substitutes “a”, “b”, and another that substitutes “c”, “d”, can I call them both up in a single formula? I was imagining it would be something like =AtoB(CtoD) or =AtoB(CtoD(OneCellToTheLeft), but I can’t find any tutorials on how to do this.

Any help would be greatly appreciated.

please explain the initial problem to solve, and NOT how you think it may should be solved.
https://en.wikipedia.org/wiki/XY_problem

and attach an sample.ods ( if you edit your post, there is an -upload-button in the middle of the toolbar! )

Basically, I’m trying to find a more efficient/easy to manage way to do what I’m already doing. I found some information indicating that this could be done roughly the way I described it, which is why I asked about that, specifically.

So let’s say there are two formulas I want to use to process/transform data. One changes all “a” in a given cell to “b”, and the other changes all “c” to “d”. Sometimes I want to use one, sometimes I want to use the other, and sometimes I want to use both.

I could just have three formulas (one that does a to b, one thst does c to d, and one that does both), and copy/paste them into the relevant cells, but that can get hard to manage when you’ve got a lot more than 2 formulas, and hard to update when I change a formula.

So what I’m looking for is a way to just have one copy of each formula that I can reference wherever I need it. Named Ranges and Expressions works well for that, as long as I’m only using one at a time. I’d like to find a way to mix and match while still only having one copy of each formula to keep track of.

like what ? :thinking:

Sorry. This doesn’t seem much of a clarification.
A guess concerning the actual problem:
Do you mean "nesting possible?" or "use both" in a sense like:
“Can the definition of a named expression accept an argument other than the ordinary references (absolute or relave or mixed), named references, named expressions where the named items are already meningful at the time of its definition?”

Yes. In specific it’s difficult to find enough adequate “speaking names” which allow to apply the named items without calling up their definitions again and again.

I’m starting to refret asking. I don’t know how to explain what I’m trying to do any better. I thought it would be relatively straightforward, but apparently not.

If you post an example file showing the before and after of what you need, it will be easier to suggest something.

Named expressions are formula tokens. You can’t use them like functions, i.e. they do not accept any arguments.

2 Likes

Sample document
Named_Expressions.ods (18.6 KB)

Thank you! That’s what I needed to know. Now I won’t waste any more time down that road.

A document attachment tells more than a thousand words.

1 Like