Home > OS >  Google Sheets - Combining COUNTBACKGROUNDCOLOR and COUNTIF formulas
Google Sheets - Combining COUNTBACKGROUNDCOLOR and COUNTIF formulas

Time:02-23

I want to count the amount a certain text(aus) appears in a column, but I only want to search the rows that have one specific color. I have the two seperate working formulas but haven't been able to combine them succesfully yet. Anybody an idea how to do this :) ? Here are the 2 formulas i have:

=COUNTBACKGROUNDCOLOR("J2:J361";"A2")

=COUNTIF(J2:J361; "*aus")

CodePudding user response:

It appears as though you are using a script to implement your own function of COUNTBACKGROUNDCOLOR(). If this is the case you cannot combine the two functions as it stands since it is a user defined function. As MattKing pointed out maybe count the cells with your data AND the method used to declare the color (checkboxes). Example:

Conditional formatting applied to cells that highlight the cell green if adjacent checkbox is TRUE.

enter image description here

Formula used

enter image description here

Notice the answer is 2 and not 3 because from your formula you are only looking for wildcards before "aus" and Cell D4 contains a "?" at the END ("what is aus?")

enter image description here

  • Related