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.