Forum Discussion

tsbarton70's avatar
tsbarton70
Copper Contributor
Apr 17, 2026

Excel - COUNTIF Function

Happy Friday! I am trying to use the COUNTIF Function on a worksheet that tracks how much liquid chlorine is used at 3 different water wells each month, each well having 2 chlorine cylinders. I'm not sure if my brain is fried from reading/watching all kinds of videos for the past 3 hours and trying to follow their instructions, but any time I put in a formula, I get a pop-up saying I've entered too many arguments. Even if I enter individual cells and use only the 3 that it highlights for me (more than 3 does not highlight). I've attached a screen shot of the worksheet (Figure 1) and have highlighted the area I'm trying to figure out. As you can see, it will be for multiple dates, on multiple lines, going through to the end of the month, with the total chlorine (CL2) tallied up on the right hand side. Chlorine tanks are changed out quite often and each tank begins at 150, depleting down to 0. Figure 2 shows a screen shot of what I'm getting when trying to enter the formula. Am I misunderstanding how the formula works or am I using the wrong formula all together?

 

Figure 1

 

Figure 2

2 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    *

    Am I misunderstanding how the formula works or am I using the wrong formula all together?

    Yes, you are..

     

    countifs(b3:b20,"N. Well",h3:h20,"<=150")

     

    • m_tarler's avatar
      m_tarler
      Silver Contributor

      Furthermore, in addition to how Detlef  corrected your formula, from your description I don't think that is even what you want/need. It sounds like you will have some sort of readings that will start at 150 and go down as the Chlorine is used so you don't want COUNT (that will just tell you how many readings were taken) but you want something like 150-MIN to find the consumption so maybe something like this:

       

      =150 - MINIFS(H3:H20, B3:B20, "N. Well")

       

      Alternatively if the values ​​you have recorded in column H are USAGE values ​​then you want SUMIF so either:

       

      =150 - SUMIF(B3:B20, "N. Well", H3:H20)

       

      or

       

      =150 - SUMIFS(H3:H20, B3:B20, "N. Well")

       

      the difference is the second option (sumifS) gives you the option to have additional conditionals