It appears that Numbers does not have user defined functions so I am writing a rather complicated expression in Emacs and then pasting it into the cell to use as an equation.
I'd like to reference in the expression a cell relative to the cell that the equation is in. Looking at Apple's function list I see functions in the "Reference" section where I can derive another location if I had a location to start with... thus the question:
Is there a function that returns the current cell's location?
It may be that there is a notation rather than a function to refer to either the current cell or a cell relative to the current cell. I'm searching the help for Numbers for that as well.
Edit:
For clarification, here is the equation I'm creating in Emacs:
IF(ISERROR(STOCKH("AAPL", "close", TODAY()−30−0)),
IF(ISERROR(STOCKH("AAPL", "close", TODAY()−30−1)),
IF(ISERROR(STOCKH("AAPL", "close", TODAY()−30−2)),
IF(ISERROR(STOCKH("AAPL", "close", TODAY()−30−3)),
TODAY()−30−4,
TODAY()−30−3),
TODAY()−30−2),
TODAY()−30−1),
TODAY()−30−0)
This is finding a date that is approximately one month ago (30 days) where the stock market was open. I try today - 30 (days) and if there is a stock price on that day, then I return today - 30. If the test fails, I try today - 31, today - 32, ... up to today - 34 which covers any three or four day weekend.
I want to do this but replace the 30 with 7 (for a week ago), 91 (for last quarter), 182 for six months ago, and 365 for one year ago.
Rather than compose each of these (which I've done but I'd like a simpler way to do it), I'd like to replace the "30" in the equation above with a relative cell reference such as the cell in the same row as the cell with the equation but in the previous column. I would then put a 30 in that cell in this instance and I would put 7, 91, 182, ... in the referenced cell in the other instances.
To recap, I'd like to just paste the equation I compose in Emacs three or four places and then put a number such as 30 in the cell next to the equation.