I don't know yet. HIMYM appeals to me with all of its continuity porn, but it all hinges on how they end it. If I'm channel flipping, I'll still watch Friends if I see it's on, but I can't guarantee the same for HIMYM yet.
Also, Scrubs eclipses both, in terms of humour and emotional connection. Neither Friends or HIMYM made me tear up, but Scrubs managed it twice.
Well.. as with most shows the early part of Scrubs was awesome but got less so as the show progressed (with some exceptions). But the first 3 or 4 seasons are better than both other shows combined mainly due to the comedy which was completed by some truly sad moments.
Plus they had the most awesome supporting characters ever.. Ted, Todd and the Janitor were just hilarious and i had stomach aches several times for laughing so hard