Google Sheets - how do you get the formula from a cell instead of the value? -
how literal value (the formula) cell instead of result value?
example desired:
a2: "foo" b3: "=a2" - displays "foo" c3: "=cell("formula", b3)" displays "=a2"of course, cell() doesn't back upwards "formula" parameter, that's demonstrating intent. i've looked on function list , nil jumps out @ me.
use case: create reference row, , based on reference other cells row. putting explicit row number won't work (e.g. b3 = "2"), since not auto-correct when rows modified. specifically, multiple columns in 1 row relative columns in row, , able alter relative row in 1 place without having edit each of columns.
normally, create 1 row relative set column values this: "=a2+5" , "=b2+10". means column "relative row value +5" , b column "relative row value + 10". if want alter relative row (for example, row 56), need alter each of columns "=a56+5" , "=b56+10". how accomplish editing 1 field?
for practical example, consider sheet list of tasks , each 1 may marked "following" purposes of computing end dates, able alter reference task , back upwards n:1 relationship between tasks.
[update]
actually, have solution specific utilize case. still curious original question: getting access formula behind value in cell.
solution 1: - a2: "=row()" - b2: "foo" - c3: "=a2" displays "2" , auto-adjusts maintain reference rows added/removed
solution 2:
another solution add together unique "id" column , store references id, find row using lookup().
based on comments adaml question, reply cannot formula cell (instead of value).
however, actual utilize case trying solve, =row(a42) can used reference specific row update automatically changes rows.
google-spreadsheet
No comments:
Post a Comment