The AblebitsAvgByFontColor function returns the average (arithmetic mean) of numbers in cells with the specified in the argument font color.
=AblebitsAvgByFontColor(C3:I9,N22) Returns the average (arithmetic mean) of numbers in a range of cells C3:I9 that have the same font color as the N22 cell.
=AblebitsAvgByFontColor(C3:I9,255) Returns the average (arithmetic mean) of numbers in a range of cells C3:I9 that have the font color of 255 color code.
Note. Formulas created with this function will work only on machines with installed Ultimate Suite for Excel. If the workbook is opened on another computer where Ultimate Suite is not installed, the result will be lost.
The AblebitsAvgByFontColor function syntax has the following arguments:
Required. The range of cells where you want to find the average value, e.g. B2:B8.
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.
Note. If a cell range in the first argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
To include logical values and text representations of numbers in a reference as part of the calculation, use the AblebitsAvgAByFontColor function.
The AblebitsAvgByFontColor function is used by the Count and Sum by Color add-in when you check the Insert result as formula box before pasting the result.
If you want to get the color code of the font color of a cell, you can use the AblebitsGetCellFontColor function.
Multiple ranges are not supported.
The function does not work for conditionally formatted cells and for ranges formatted as tables with colored alternate rows or columns.