At 22:20 15/02/2015 -0700, Gary Aitken wrote:
I can't find how to do this in the docs; not even sure it's possible
but seems like it should be. Assume column A is named "foo" (select
column, insert/name/define). In column B I can use the corresponding
element in the same row in A in a formula by using its name, e.g.
=foo*3
Is there a way to reference a cell in column "foo" (A) relative to
the row in which the formula is being defined? What I want to do is
subtract the previous row value from the current row one:
=foo - [foo-1]
How do I say that?
=foo-INDEX(foo;ROW()-1)
Mind you, I'm not at all sure why you would want to do this. Column A
already has a perfectly serviceable name: "A"! Why not have in B2 just
=A2-A1
and so on?
Named ranges have their uses, such as referring to a table of values
elsewhere in a document, but I don't think this is one. If you do
want your "foo" column elsewhere, you could construct a parallel
column of differences there too and then name that range instead (or as well).
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]