AblebitsCountByColor function

The AblebitsCountByColor function counts the number of cells that contain numbers with the specified in the argument background color.

For example:

  • =AblebitsCountByColor(C3:I9,N22) Counts the number of cells in the C3:I9 range that contain numbers and have the same background color as the N22 cell.
  • =AblebitsCountByColor(C3:I9,255) Counts the number of cells in the C3:I9 range that contain numbers and have the background 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.
Tip. You can find the complete list of custom functions on the Ablebits functions for Excel page.

Syntax

AblebitsCountByColor(range,color)

The AblebitsCountByColor function syntax has the following arguments:

  • range
    Required. The range to count cells with numbers, e.g. B2:B8.
  • color
    Required. The background color of cells that contain numbers and should be counted. Can be a reference to one cell like B6 or color code like 255.
Note. The range can refer to a variety of different types of data, but only cells with numbers are counted.

Remarks

  • To count all cells of a certain color, not only those that contain numbers, use the AblebitsCountAByColor function.
  • The AblebitsCountByColor 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 background color of a cell, you can use the AblebitsGetCellColor 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.

Post a comment

Seen by everyone, do not publish license keys and sensitive personal info!

If you have any questions or issues with this add-in, please feel free to post your concerns in the comments area. As soon as we answer, a notification message will be sent to your e-mail. If you do not want to share your thoughts in public, please contact us at support@ablebits.com.