I have learned how to use the Query formula in Google Sheets. I'm wondering if there is a comparable function in Google App Script. I would like to look at a 2D array and find a value where to variables intersect.
Consider an array where each row has a name, and each column has a month. The intersection has some dollar amount. I need programmatic language to say, What is the value for row(Nate), column(november)?
https://docs.google.com/spreadsheets/d/1vd7hgRVNTtIvKrr2ssLzVoDw5IVaXjOjF39CvVm2cYQ/
I know how to do this with for loops. I am wondering if there's just a simpler way. I wish there was array.FindValueAtCoordinates(rowkey,colkey).
Try this:
This creates an associative array between names in first column and row numbers and between column headers and column numbers.
Make sure your top row of column headers is formatted as plain text. Otherwise they maybe interpreted as dates in auto and there is no function getRange(string, class).
This is just some code I was playing around with to test the above function. Uses a table similar to yours. It generates a modeless dialog with all of the possible intersections listed.