Calculating the Number of Hours Worked Based on a System of Letter Codes

Problem:

Column B contains a list of letters which are codes for the hours worked on each of the days listed in column A.
"N" indicates a 9 hour day, "H" indicates a 4 hour day and "V" indicates no hours were worked that day.
We want to calculate the total number of hours worked during the week.

Solution:

Use the COUNTIF function as shown in the following Formula:
=COUNTIF(B2:B8,"N")*9+COUNTIF(B2:B8,"H")*4

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube