Home > Back-end >  excel - for each cell in X:Y that contains symbol "★" add 1 to cell Z
excel - for each cell in X:Y that contains symbol "★" add 1 to cell Z

Time:10-20

I tried looking up this question or trying to mix other similar formulas I found together to no avail..

Could someone help me out please?

CodePudding user response:

You can use this formula to count the amount of cells in a range (A1:E1) which contain the letter "b":

=SUM(IF(ISERROR(FIND("b",A1:E1)),0,1))

The result of FIND() is either a location either an error.
The IF(ISERROR()) translates the error in 0, the non-error in 1. (There is no ELSE-clause in the IFERROR() function, hence this construction)
The SUM() is obvious.

Have fun

CodePudding user response:

So, using countif():

enter image description here

Then if column AA has the original value, the incremented value would be given by:

=AA1 COUNTIF(X1:Y1,"*")

If there are other characters surrounding the target character then wildcards work: enter image description here

  • Related