Here's the strategy: Cut out the bad pieces so that the splices are offset by at least one joist width, and new boards are at least two joist spaces wide. Staggered splices look better and make a stronger deck. Removing the bad sections and making the splices work can be a bit of a puzzle, so get off on the right foot by marking the replacement boards before starting.
If you want a close match between old and new deck boards, you'll have to match the species of wood. This is tricky, because weathered deck boards look alike. Remove a board, cut it with a circular saw, and smell the wood to identify the species. Pressure-treated pine has a sweet smell, cedar an aromatic smell, and redwood a more pungent smell. Ask your lumberyard to cut a scrap from each species and match the smell to your own board.
Since you'll be cutting random-length replacement boards, buy the longest boards you can transport; they'll yield less waste. Buy galvanized or stainless steel nails or screws long enough to penetrate the joists by at least 1-1/2 in. The length of the fasteners depends on the thickness of your decking.
Always cut out pieces that span at least two joist spaces. This keeps the new boards from splitting as they age. For best appearance, stagger the splices from one row to the next by at least one joist space. You may need to cut beyond the rot and remove intact wood to make the splices work.
Position the new boards so the growth rings cup down. The grain won't split open and collect water as readily. For a really clean cut, identify the top side of the board, flip it over, and make the cut. The bottom of the board gets a cleaner cut because circular saw teeth cut from the bottom up. When you cut a board, don't leave a knot at the end. To get a tight joint between old and new boards, angle the jigsaw slightly when cutting out the bad board so the bevel on the remaining deck board is longer at the top.