Search code examples
google-sheetsarray-formulasgoogle-sheets-formula

Formula with multiple text count


I have a Google Sheets with cells similar to this:

Column A contains GENDER (Man or Woman),
Column B contains chosen color (can be multiple colors, ie. Black, Blue, White).

Sample data

What I would like to do is to count how many times Man chooses Black, White or Blue color. I tried this formula for each of the colors but it's not working:

=ArrayFormula( SUM( ('Submissions'!A2:A1095 = "Man" ) * 'Submissions'!B2:B897 = "*Black*" ) ) )

Can you help me with the formula?


Solution

  • try this one

    = arrayformula(COUNTIF(A:A&B:B, "Man" & "*Black*"))