Conditional aggregation of data

Data aggregation represents a mathematical operation (summarization, counting, averaging) that we perform over a set of data. Conditional aggregation, as its name implies, is performing data aggregation over a set of data that meets certain condition which is contained within a given data range. In this “recipe” we’ll cover functions that use single condition for performing aggregation.

Cell content testing

There are several functions in Excel that literally serve to “find the cell in time and space”. They can be used to identify the row and column in which the cell is located, count the rows or columns, determine the type of value that the cell contains … By themselves, these functions are seldom used. In combination with other functions, in conditional formatting, and especially with data validation, they can be irreplaceable.

Error checking functions

Errors are happening and this is inevitability! When we know in advance that there is a high likelihood that they can happen, we can use error detection functions. They can discover whether an error has occurred, to return its code, and to show an alternative value instead of a mistake. This can be, for example, a notification about a predefined text about an error or an empty cell, if we want to ignore the error …

Testing a condition

Testing of the conditions is done so that, depending on its fulfillment, we will get different results. These can be some concrete values, but most often, depending on the fulfillment of conditions, we devise different formulas for calculating. It is possible to create multiple conditions (multi-branching) or as a condition to specify an index that determines which expression will be calculated. The following text will detail the logical functions for testing the conditions.

Ranks

One of the first things you learned in Excel were the functions for determining the maximum (MAX) and minimum (MIN) of a range. Also, sorting a range can easily determine the order of its members, from the smallest to the largest or in the opposite direction. But, since it’s not convenient to manually count the members’ ranking, we can use one of the Excel ranking functions.