I have a sheet with in-time and out-time recorded in 24 hour time format. (A1 contains in-time and A2 contains out-time). The in-time and out-time are provided for all dates in a month. So some of the cells contain text, like in case of holidays, the cell contains ‘H’ and in case of weekends, the cell contains either ‘SAT’ or ‘SUN’. I have figured out to get the total time by using the formula below (with formatting cell as hh:mm):
=ABS(Sheet1!A1-Sheet1!A2)
Now I would like to avoid getting #VALUE! errors for the holidays and weekends and calculate the average total time.
Can someone help? Below is a sample data that shows cells containing total time and text.
Dates 1 2 3 4 5 6 ... AVG
ABC1 H 4.00 12.00 7.45 SAT SUN ... <avg time>
ABC2 H 8.00 13.00 8.45 SAT SUN ... <avg time>
Thanks.
You can use the ISNUMBER() function to only consider the times and ignore the letters: http://www.techonthenet.com/excel/formulas/isnumber.php