I have a range
idz01 idz04 ida02
foo a 1 b
bar c 3 8
baz 8 2 g
And I want to get values from this range, like this:
SOME_FUNCTION(rangeID, 'foo', 'idz04')
to get 1
, etc. Or ideally, to get the cell:
INDIRECT(SOME_FUNCTION(rangeID, 'foo', 'idz04'))
or such.
Is there something such? Can the GETPIVOTDATA()
be used for that?
Edit:
I could somehow employ the LOOKUP
if I was able to get the result_range
:
LOOKUP("foo", DataRange,
FIRST_COL(
OFFSET(DataRange,
MATCH("idz04", FIRST_ROW(DataRange), 0)
)
)
)
Only, I don't have FIRST_ROW()
and FIRST_COL()
... Maybe FILTER()
could help?
For this you could write a custom function using Google Apps Script. Check this documentation for more details.
You could access the spread sheet with name or id and get the range of values(in your case a cell).
Hope that helps!
Try this, you just need to set ranges:
For example if your table is in the range A1:D4, use:
You can also use named ranges
To get first columns and rows automatically use this formula:
To do this via script, use this code:
You can then call the formula in your sheet like this:
Tried to write my own function...
Here it goes:
Not really neat :P
Also see Google Spreadsheets: How to get a first (Nth) row/column from a range? (built-in functions)