Home > database >  Count text with conditional if not working on Google Sheets
Count text with conditional if not working on Google Sheets

Time:02-28

I'm trying to count some text depending on if a cell say Yes or No. So basically I have the formula that work for count the text or any value different than empty that is this one:

=COUNTIF(G2:G14,"?*") COUNT(G2:G14) 

The problem comes when I try to use the IF with this formula:

=IF(D2="Yes", COUNTIF(J4:GI4,"?*") COUNT(J4:GI4))")"

This is the image of the sheet and the formulas:

enter image description here

Any help or suggestion to resolve this?

CodePudding user response:

Omit last ")" in your formula. That is causing error. Try-

=IF(D2="Yes", COUNTIF(J4:GI4,"?*") COUNT(J4:GI4),"")
  • Related