if A1 has a Excel serial time of the hours worked in a week
=MAX(0, A1-TIME(40,0,0) is the overtime and =1.5*MAX*0, A1-TIME(40,0,0)) is the amount of comp time.
(At my work, comp time is additional vacation time at time and a half of overtime hours worked)