Clock in sheet time range HELP!

Can someone please help with this tried to get time from a range closest 5 minutes

=IF(NOW()-TODAY()<$J6:$J6,IF(NOW()-TODAY()>$J258,$J258,VLOOKUP(NOW()-TODAY(),IN,1)))

range is from 06:00 am – 03:00 am, for somereason i cant get this to work.