A common organization for spreadsheets is to have a bunch of “detail”
rows, each perhaps describing a transaction, and then a set of
“summary” rows that each show reduced data for some subset of the
details. SES supports this organization via the
(ses-selectfromrange test torange
Example of use:
(ses-average (ses-select (ses-range A1 A5) 'Smith (ses-range B1 B5)))
This computes the average of the B column values for those rows whose A column value is the symbol 'Smith.
Arguably one could specify only fromrange plus to-row-offset and to-column-offset. The torange is stated explicitly to ensure that the formula will be recalculated if any cell in either range is changed.
File etc/ses-example.el in the Emacs distribution is an example of a details-and-summary spreadsheet.