That works for me, Kaper, but you can simplify a little with this version

=NETWORKDAYS(A6,B6,Z$1:Z$14)-1+MOD(B6,1)-NETWORKDAYS(A6,A6,Z$1:Z$14)*MOD(A6,1)

Assumes that A6 is any time but B6 will be within work hours - multiply by 24 if you want decimal hours otherwise format as [h]:mm