Forum Discussion

Maggie1953's avatar
Maggie1953
Copper Contributor
Aug 30, 2022
Solved

Help with this formula =COUNTIF($E7:$CP7, "V")

I am trying to keep track of the vacation hours my employees take.  Excel has a good program that helps you count each quarter separately. However, this formula below means if I put a V in the space it turns it purple and a count of one in the total column. I actually need it to let me put in V-8 or V-4 so I can keep track of the actual hours.

 

Maggie

4 Replies

    • Maggie1953's avatar
      Maggie1953
      Copper Contributor
      I cannot tell you how much this helped me to get caught up. I do have one more question. In our company, they can take vacations in any amount. We are given a certain number of hours in January, and we can use them all year in any increments. It adds all the 4/8 I put in but not the other numbers.
      • HansVogelaar's avatar
        HansVogelaar
        MVP

        Maggie1953 

        Try this. If you don't have Microsoft 365 or Office 2021, confirm the formula with Ctrl+Shift+Enter:

         

        =SUM(IF(LEFT($E7:$CP7,2)="V-",-MID($E7:$CP7,2,10)))

Resources