SOLVED

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

New Contributor

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
best response confirmed by Sergei Baklan (MVP)
Solution

@Maggie1953 

Perhaps

 

=8*COUNTIF($E7:$CP7, "V-8")+4*COUNTIF($E7:$CP7, "V-4")

THANK YOU SO MUCH
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.

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