Calculating number of set occurence in cells

Copper Contributor

Hi.
I´d like to make a calculation/formula for the number of occurences in a certain range of cells in my excel. But it´s not numbers but simply K or H put in those cells, how do I accomplish that? Thanks in advance.

12 Replies

@Andreas_Nordin Look into the COUNTIF function

@Riny_van_Eekelen Thanks I have done that without any success unfortunately. Seems all examples I find is based on cells with numbers. I simply want excel to count the number of K´s in a certain row and then the number of H´s in another.

@Andreas_Nordin 

You would apply a COUNTIF function like below:

 

=COUNTIF($C$1:$C$3,B$5)

If you choose to type the letter to replace B$5, you include quotation marks for text, so the formula would adjust to

=COUNTIF($C$1:$C$3,"K")

 

 

adversi_1-1605695462696.png

Thanks but that didn´t work either.
=($DR$13:$FF$13,$FD$18) is my formula where DR13 to FF13 is the cells (in one row) that contains the K´s and H´s and FD18 is the cell where I put K. But excel won´t have it.

@Andreas_Nordin 

Did you add the Countif function in the beginning? Sharing a screenshot can help with identifying any other issues

@adversi Yes I did as written above, so it´s exactly like that with the same logic but excel won´t accept it unfortunately.

May I be so bold as to assume that you are working on a Swedish version of Excel? Use a semi-colon to separate the arguments in your formula, rather than a comma.

@adversi yes here´s how it looks with my Swedish excel.

@Andreas_Nordin Use =ANTAL.OM(........) in stead.

@Riny_van_Eekelen Finally, thanks that worked like a charm.