You show up to a meeting early and the only other person there is someone you can’t stand. It’s too late to walk out of the room, so you sit down, as far away from the individual as possible, and spend the next few minutes wishing someone else would arrive. What can you do?

We’re not always going to like all of our coworkers (and not everyone is going to like you), but there are steps you can take to ensure you maintain a productive and civil relationship with everyone, even that person with the inappropriate jokes about his mother-in-law, or the one that rambles on about his daughter’s time at tuba camp.

It’s worth the effort. According to the Harvard Business Review, people with close relationships at work are more engaged, productive, and successful than those without. It makes sense doesn’t it? People will go out of their way to help others they know and like, and in the competitive business world, having allies is always a good thing.

Here’s how you can do it.

Start by taking a look at yourself

Chances are, if you don’t like a co-worker, it’s not their chronic lateness to meetings or inability to refill the coffee maker that really bothers you. It’s usually something about their character and personality, and in many cases, this trait might closely resemble something you see in yourself.

What can help is taking a long and honest look at yourself. Why do you have a problem with this co-worker? What is the trigger affecting your perception? Do you see those faults in yourself? If you accept yourself and your flaws, it can help you manage your reaction to colleagues, which is a lot easier than expecting an individual to magically transform into a different person.

They know you don’t like them

Those coworkers you don’t like? They probably know it, and that can only make things worse, creating a vicious cycle of increasing tension and passive aggressiveness.

Your feelings about your colleagues will be mirrored in your attitude and behaviour towards them. If you like someone, you’re probably going to be gracious and kind towards them, but if not, you’ll likely be more impatient and irritated, which will be redirected back to you. People you don’t get along with are going to find ways to impede and frustrate you. In other words, practice your poker face. It’s crucial to act fair, impartial, and professional.

Find common ground and try a little kindness

No matter how much you might not like a co-worker, there must be something you both like (or hate). Discovering your mutual likes and dislikes can be a solid foundation for conversation. Maybe you both think The Americans is criminally underrated, or that Drake’s continuing popularity is a mystery. If all else fails, there are always those tried and true topics: the weather and the commute. Sure, griping about humidity or traffic might not seem like a lot, but having something in common is a critical first step.

Then again, so too is a little generosity and kindness.

Running out to grab a snack or cup of coffee? Ask your colleague if he or she would like something too. Try paying co-workers you don’t like a disarming compliment. Focus on something you actually do like about them – a new haircut or outfit for example – and tell them. Generosity and genuine compliments amplify positivity, signalling that you’ve noticed and value someone. Think about it, wouldn’t you love to hear that you handled a client’s question brilliantly or that your hours of preparation paid off with a fantastic presentation? In the end, the desire for acknowledgement is universal. In fact, it can be the key to unlocking a new relationship.

We’re not always going to like all our colleagues, but that doesn’t mean that we can’t make the best of it. With a little perspective, compassion, and empathy, you can get along with a co-worker you don’t like (no matter how bad his  jokes are).