I want to check for a string and then add to another variable

What I am trying to do is be able to input into a space either a “yes”, “no”, or “late” and then add to a tally in another space dependent on what was entered.

I have been looking at either nested if statements or at the vlookup function but I wanted to see if anyone would know a more efficient way of doing it?

What’s a “space” in your terms? A cell?
Do you expect the tally to count along based on the “previous state”? (Spradsheets are not history aware.)

im sorry. by space I meant cell.

I suppose another way to put it is that I want a cell to check it’s row for a given string and then count up the number of times it is in the row.

=COUNTIF($A10:$K10;"yes") in L10 =COUNTIF($A10:$K10;"no") in M10 =COUNTIF($A10:$K10;"late") in N10 e.g.
Better enter the strings to look for in dedicated cells and replace the string constants by the respective references.

=SUMPRODUCT($A10:$K10="yes") in L10 and so on may look a bit strange, but is better than the above formula, imo.

(Read the help texts about functions. You may exclude many not usable for you.)

This is EXACTLY what I was looking for thank you so much!