There are a few other factors you must check. The bike must be in an upright position, spray every thing that moves with WD40 or similar product(don't get any on rims or brake pads). Check that the rear der. cage with the two little wheels (pulleys) is as close to perpendicular to the ground as possible. If not (often bent in from bike falling or getting knocked) grab whole cage and attempt to gently straighten. If body or mount area of der appears bent best to replace. Then check that with no tension on cable that when looking down from above the pulleys are directly below smallest gear. If not, there are two small limit screws that limit travel of der at both ends of its swing. Adjust so that when on smallest and largest gear, pulleys are directly below respective(smallest or largest) gear cog. Then on smallest cog slowly back pedal and watch for chain jump between pulleys. This will indicate frozen or twisted chain links that will cause gear cog jumping when pedaling under pressure. If der cage snaps forward or chain doesn't move very smoothly when back pedaling replace chain. Chains also have a fairly limited life span(usually only one or two years of average use) during which index shifting will work properly. Now you may attempt to adjust cable tension, loosen cable clamping screw, turn tension adjust barrel screw (that cable goes thru) all the way in then back out one or two turns. Grab cable with pliers and put tension on cable, move shift mech back and worth, if there is any stiffness replace cable and housing, if not, with shifter in position for smallest cog tension cable moderately with pliers then tighten cable clamping screw. Check shift and use adjust screw to get proper movement and no chatter(as described by CT). To adjust front der the only two important positions are all the way down and all the way up-use limit screws to adjust so chain does not rub cage(which must be parallel to front chain rings) when chain is in its most extreme crossed positions but still allows for shifting up or down without missing chain rings. After limits are set adjust tension on cable by placing der in position closest to frame, loosen cable clamping screw and pull cable moderately tight then retighten screw. Recheck shifting to all gears and make any minor adj needed. Or just take the thing to a bike shop and get it done right.