Also, cable-friction tends to only cause laziness and 2-gear shifts going from the big to smaller cogs where it's only spring-tension that moves the derailleur. Your hand can apply a lot more force than that spring and can overcome pretty much
any cable-friction when going from small to big cogs.
Since you have issues with the RD shifting up AND down the cogs, there's something else going one, perhaps in addition to possible cable-friction. First do the chain-wear measurement that FB suggests. It's a very quick and simple test.
Then eyeball the bike from the rear for vertical alignment of the rear-derailleur and hanger:
Park Tool - Rear Derailleur Hanger Alignment. The rear-derailleur cage should be vertical.
http://bikebooboos.com/images/derailleur%20hanger.gif
It's possible if you have play where the derailleur attaches to the hanger, that can cause poor shifting. Or sometimes the hanger isn't bolted to the frame securely as well.