You'll need an array function (CTRL, SHIFT and ENTER) such as this one:

=MAX(IF(B2:B14="Val2",A2:A14))-MIN(IF(B2:B14="Val2",A2:A14))+1

to give the actual time at Val 2

However, this won't work on your data, as excel doesn't recognise the time format you're are using. It will need to be converted to a format excel can read as a number.