Forum Discussion

Andreas_Nordin's avatar
Andreas_Nordin
Copper Contributor
Nov 18, 2020

Calculating number of set occurence in cells

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

  • adversi's avatar
    adversi
    Iron Contributor

    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")

     

     

    • Andreas_Nordin's avatar
      Andreas_Nordin
      Copper Contributor
      =($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.
      • adversi's avatar
        adversi
        Iron Contributor

        Andreas_Nordin 

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

    • Andreas_Nordin's avatar
      Andreas_Nordin
      Copper Contributor

      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.

Resources