Although Ted consistently states that Marshall is his best friend, Barney just as consistently argues or acts as if he did not hear.
Barney and Ted have an interesting relationship. Barney’s goal when he met Ted was to show him how to live. Throughout he seasons, Barney has been pushing Ted to live life to the fullest and do wild things with him in order for every night to be “legend-wait for it-dary”.
Ted, Marshall and Barney differ a lot: Barney is the all out partying and living live to the fullest guy, while Marshall is the calmed down and happily settled guy. Ted is stuck right in between. Both Ted and Barney joke a lot about Marshall being married though, while Ted often states he wants to have 'that', marriage and kids', as well.
While Barney is often seen trying to be Marshall's best friend, he is more closer to Ted, as they share more similarities. Same goes for Ted and Marshall, not counting their history together. While Barney was actively trying to get Ted to stay single, and complaining all the time when he was dating, Marshall was more upset with the Ted that lived the single live, for example when he kissed a married woman in No Tomorrow. Marshall and Barney are still close friends, as Barney entrusted Marshall with the secret that he was in love with Robin, after Lily didn't wanted to see them.
|Ted:||Bro, for what it’s worth: If we were both gay, you’d be my first call.|
|Barney:||Would you mind calling Marshall, and telling him that, because….|
|Ted:||No, this is only a scenario where just you and I are gay, not Marshall.|
|Barney:||But if all three of us were gay, you’d pick me over Marshall, right?|
|Ted:||If all three of us were gay? Girlfriend, we would all three of us have some fun.|
|Marshall:||You know what, Doug, I will gladly pay. And you know why? Cause that's what grown-ups do! They pay for their drinks and they don't get into fights. You know what I was doing while you guys were out there being immature? I tell you what I was doing...|
|Marshall:||Hahaha, no. I was doing...|
|Ted:||a relationship-quiz in this month's Cosmo?|
|Marshall:||NO, I was doing...|
|Barney:||Your best not to cry when Big came back for Carrie at the end of the Sex and the City movie?|
|Ted:||So I guess that decides it.|
|Barney:||Hanging out at a coffee place: not nearly as much fun as hanging out at a bar.|
|Ted:||[Looks at Marshall's cup] Hey, what's that?|
|Ted:||That cute coffee girl wrote a heart by your name!
[in a sing-song voice]
|Ted:||Somebody has a crush on you!|
|Barney:||[In a sing-song voice as well] Somebody thinks you're me!|
|Marshall:||Well, what if the heart doesn't mean anything? What if she writes them on all the cups?|
|Ted:||Mine says "Ted", no heart.|
|Barney:||Mine says... "Swarley"... How'd they get "Swarley" from "Barney"? It's not even a name. Who would ever be called "Swarley"?...
[sees Marshall and Ted smile]
|Barney:||Oh, please don't start calling me "Swarley"... This would never happen at a bar!
[leaves the coffee shop angerly]
|Ted:||Man! What's up with Swarley?|
|Marshall:||I know. You almost never see old Swarlz get that upset.|
|Barney:||[about the girl Marshall's going on a date with] She's got the... 'Crazy Eyes'.|
|Ted:||Dude... the eyes... they're CRAZY.|
|Marshall:||What are you guys talking about; the 'Crazy Eyes'?|
|Barney:||It's a well-documented condition of the pupils, or pupi.|
|Ted:||Nope, just pupils.|
|Barney:||It's an indicator of future mental instability|
|Marshall:||She does not have the crazy eyes.|
|Ted:||You just can't see it because you're afflicted with "haven't been laid in a while" blindness.|
|Marshall:||I don't know.|
|Future Ted:||Actually, he did know that the worst we were looking at was a small civil settlement, and probably no criminal charges. But he was really pissed at us.|
|Marshall:||I mean, you guys could be looking at some serious prison time.|
|Ted:||I can't go to prison! I could get a lot of reading done, finally write some short stories. Work out all the time. Seriously, if I don't come out - of there completely ripped|
|Barney:||Ted, we can't go to prison! People get shivved in the joint! Plus the meals are really starchy.|
|Marshall:||You guys should have thought of that before you beat up those guys.|
|Barney:||What if we didn't?|
|Ted:||Didn't beat up those guys. What if Doug beat up those guys all by himself and we didn't do anything?|
|Marshall:||I knew it! I knew it! I knew it! I knew it! You guys didn't throw a single punch.|
|Barney:||Well, I hit Ted and myself, - so|
|Marshall:||Well, who's the wuss now? Answer: You guys.|
|Ted:||Look, can you just help us get out of this?|
|Marshall:||You know the old expression: If you're not prepared to do the time don't pretend to do the crime and laugh and get free drinks and not stand up for your friend who, incidentally, has been in plenty of fights with his brothers.|
|Barney:||Look, you've got to help us out, Marshall. We're the Three Musketeers! If I give up Ted, how much time am I looking at?|