thanks for the reply
i tried the second code, both the first one, and the edited one, but i got an error on both as soon as i pressed enter after pasting the code in the cell.
after i pressed enter, and clicked ok on the error msg, it marked 2.5 automaticly, dont know if that ment that that is where it had a problem, but that seemed locigal atleast it marked 2.5 at the end of this:
=IF(C3="";"";MEDIAN(0;2.5-

and the formula for hours between 21:00 and 06:00 that i hade, seemed to be working, so i havent tested the one you posted. did you see/find any errors in the one i had?