The PIVOTBY function allows you to create a summary of your data via a formula. It supports grouping along two axis and aggregating the associated values. For instance, if you had a table of sales data, you might generate a summary of sales by state and year. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.