If you look at the pre-gen Ranger in the Starter Set, he needs advantage to use his Sneak Attack with Shortsword or Shortbow. Or, instead of advantage, he needs an enemy to his target within 5' of the target.
That kind of made me think that although he didn't get advantage if one of his friends...