The AblebitsAvgAByFontColor function calculates the average (arithmetic mean) of numbers in cells with the specified font color. Can include empty cells or not depending on the argument.
Tip. You can find the complete list of custom functions on the
Ablebits functions for Excel page.
Syntax
AblebitsAvgAByFontColor(range,color,skip_empty_cells)
The AblebitsAvgAByFontColor function syntax has the following arguments:
-
range
Required. The range of cells where you want to find the average value, e.g. B2:B8.
-
color
Required. The font color of cells to calculate the average value. Can be a reference to one cell like B6 or color code like 255.
-
skip_empty_cells
Optional: TRUE or FALSE. If you do not add this argument, the result will equal to TRUE and will not include empty cells into the calculation. However, if you add the FALSE argument, empty cells will be included.
Note. The AblebitsAvgAByFontColor function counts cells containing any type of information, including error values and empty text (""). For example, if the range contains a formula that returns an empty string, the AblebitsAvgAByFontColor function counts that value.