Can a woman lead birchat hamazon if there are men that partook in the meal? Can they lead it if the men leave?
The ביאור הלכה in סימן קצט ד"ה ויוצאות says from the יד קטנה that a woman may not lead the zimun on behalf of men who are מחויב. Moreover he writes that the women must hear the zimun from a man, implying that three women at such a meal could not form their own zimun, following the rules of division of zimun found in סימן קצג סעיף א. However the מ"ב ס"ק יח quotes the גר"ז that the regular rules of division would apply and three women can choose to form their own zimun if they do not want to participate in the men's zimun. In שער הציון אות ט he rules in accordance with the latter opinion.
Accordingly: If there are three women and less than ten men, they may form and lead their own zimun which will be of no consequence to the men. If there are less than three women and more than three men OR three or more women and ten or more men, the women must listen to a man lead the zimun. There is no indication in these sources that the men's presence has any effect in the former case, though as in all cases, if there are three men there the women must find some way to discharge their obligation in zimun.