Search code examples
excelif-statementcell

How to count and check if cells are true or false for some condition


I have to check for all cells from A0 to A10 if the value of cell is smaller then 100 and if it is increase value of B0 to +1. I'am complete noob for excel and I have test tomorrow. Please help, what function can do that. I need my program to do this but in excel:

int variable = 0;
if (cell(A0:A10)<100) variable++;

And how to print "yes" if if-function that checks value of cell is true or false and then print "no"


Solution

  • I will do this, in column A1 (A0 doesn't exist) will add this formula: =COUNTIF($B$2:$B$11,"yes") which will count how many cells are below 100.

    And then, next to the value from A2 to A10, beginning in column B2, I will add: =IF(A2<100,"yes","no") which determined if value is less than 100, then "yes".