On very short notice, Andy is given the nearly-impossible task of getting an advance copy of the unreleased seventh Harry Potter book for Miranda's twin daughters. Miranda, who is displeased with Andy at the time, seems to have done this in order to punish Andy, and is probably trying to make her quit. To Miranda's surprise, Andy manages to track down a copy of the manuscript and returns to the office victorious.
On top of that, she managed to get two extra copies to Miranda's twin daughters on the train. Without Miranda's knowledge.
In an early scene, after Andy snickers at something said during a meeting, Miranda proceeds to lay a verbal smackdown on her, during which she dissects her character and details the impact of the fashion industry to make the point that Andy shouldn't consider herself above fashion (see the quotes page for the full speech).
During this, she shows that she can remember the exact year the colour Andy's wearing (cerulean) first came into being, who came up with it, how it evolved over the next several years, and possibly even her own role in its evolution (though she might not have meant that last part literally).
Miranda's penultimate scene, in which she reveals precisely how she sabotaged the attempt to replace her. Granted, part of her way of dealing with it was a major Kick the Dog moment, but the fact she was able to produce a long list of models, writers, designers, editors etc. who had specifically promised her that they would follow her if she left the magazine drives home how she really is as indispensable as she acts.
Actually, any time Miranda reminds everyone why people put up with her; namely, she is really good at her job. The above moments are standouts, but she repeatedly (and off-handedly) demonstrates her massive knowledge of the industry, and while the constant timetable changes and rapid-fire instructions she gives may be unfortunate for her beleaguered assistants, the magazine nonetheless functions because Miranda herself clearly has no difficulty remembering every single aspect of her schedule and organisation.
Andy finally gets fed-up with Miranda's demanding ways when she not only blasts her for something that wasn't her responsibility—the twins' passports expiring—she expects her to pull off the impossible task of getting them renewed within a matter of hours in the middle of the night. Andy tells her "Fuck you, Miranda. Fuck you", and walks away.
Andy even acknowledges it somewhat in the book, stating that she supposes its better to be fired for swearing at your boss, rather than the multitude of reasons Miranda has fired other assistants.