When three men eat together they form a zimun and must bentch together. However, if a situation arises where one of the three could not partake in the food of another (e.g. he promised he would not derive any pleasure from one of the other two individuals), then they would not form a zimun because they would not be considered three people partaking in a meal together.
The Mishna Brura writes (196:9), that if two men were eating a fleishig meal and one man was eating milchig, the three men can join to form a zimun being that the person eating dairy can at any time clean his mouth and partake in the meat of the other two people. The Mishna Brura adds that the one to lead the zimun should be the one who ate dairy since he can join the meat eaters whereas the meat eaters cannot partake in his dairy food.
However, if the person eating dairy was eating hard cheese he may not partake in the meat of the other two men and therefore he cannot join to form a zimun (Mishna Brura 196:9). This is because one who eats hard cheese cannot simply wash his mouth and eat meat right away without waiting a certain amount of time. If the three men ate a k’zayis of bread together and only afterwards they ate the hard cheese/meat they may form a zimun since their initial eating of the k’zayis was eaten together and enabled them to form a zimun.
These situations arise on Shavuos for those who eat meat at the end of a dairy meal and bentch together with men who did not partake in the meat.