I'll add that a dirty, corroded, binding cable often has some tell tale signs or sign - the derailleur will move the chain up the cassette (bigger cogs) and even feel normal, but be slow to drop it down - to smaller cogs. That can then get you to shift again... now the derailleur is one or two (or 1 1/2) cogs off... so, you shift the other direction, the chain's chattering and jumping, etc. You get the point.
A really dirty drivetrain can behave like that too. But there's no way you'd let this thread get to 19 posts and have the cause be a dirty bike... right? ;-)