Use a spreadsheet calculation as a formula elsewhere?
Hi,
I need to create custom functions that are computed in a spreadsheet. Then, in another spreadsheet, I want to use that custom function as a formula.
As a simple example, I want to create a custom function that adds 2 to its input. I'd create a small spreadsheet, Table 1, that has an "input" cell (the input to the function), and an "output" cell (the result of the function). The input cell is A1, and the output cell is B1 and has the formula "=A1+2".
Then, in another spreadsheet, Table 2, I'd somehow (and this is what I don't know) say that I want to pass a value into the input cell and read the value of the output cell. So if Table 2 has A1 equal to 5, and I put into B1 the function SPREADSHEETFUNC( "Table 1", "A1", "B1"). This imaginary function takes as arguments the table name which computes the function (Table 1), the input cell (A1), and the output cell (B1).
So, if Table 2::A1 is 5, the Table 2::B1 would be 7.
If I change Table 2::A1 to -2, Table 2::B1 changes to 0.
I know there's no SPREADSHEETFUNC() function, but is there anyway I can accomplish this?
The motivation is that I want to define a custom function once and then use it in several different tables on my sheet.
Thanks, Eric
MacBook Pro 16″, macOS 10.15