How to get a literal value (formula) from a cell instead of the result value?
EXAMPLE OF DESIRE:
- A2: "Foo"
- B3: "= A2" - so it displays "Foo"
- C3: "= CELL (" formula ", B3)" displays "= A2"
Of course, CELL () does not support the “formulas” parameter, which simply demonstrates intent. I looked through the list of functions and nothing jumps at me.
CUSTOM CASE:
I would like to make a link to another row and based on this link to get other cells from the row. Putting an explicit line number will not work (for example, B3 = "2"), because it will not be automatically corrected when changing lines. In particular, I would like several columns in one row to refer to columns in another row and be able to change the relative row in one place without having to edit each of these columns.
Typically, to make one row relative to another, you would set the column values as follows: "= A2 + 5" and "= B2 + 10". This means that the column "relative row value +5" and column "B" - "relative row value + 10". If you want to change the relative row (for example, to row 56), you need to change each of the columns to "= A56 + 5" and "= B56 + 10". How to do this by editing only one field?
For a practical example, consider a worksheet that is a list of tasks, and each of them can be marked as “next” for end date purposes, but you would like to be able to change the reference task and maintain the N: 1 relationship between tasks.
[Update]
In fact, I have a solution for a specific use case. But I'm still curious to know the original question: access the formula behind the value in the cell.
SOLUTION 1: - A2: "= ROW ()" - B2: "Foo" - C3: "= A2" displays "2" and automatically adjusts to maintain the link when lines are added / deleted.
SOLUTION 2:
Another solution would be to add a unique "id" column and save the links by id, and then find the row using LOOKUP ().
source share