On a recent trip to Michael's, I overheard not one, but two, women complaining to clerks that the yarn they needed to finish their projects was out of stock. Hey, we've all been there. Sometimes I buy yarn just because it's on sale or has pretty colors without having a project in mind. Then, when I try to make knee socks, I only have enough to go mid-calf. Or I'll try to make a baby blanket and run out before I can add a scalloped edge. I have a bad habit of losing labels, so I can't find the same yarn even if it is in stock.
Ashley Little has some solid advice, or you could always just stop cold with a yarnless bindoff. Most times, I'll just switch colors like I did in the blue-edged blanket below. I wove in the matching ribbon and tied it with bows at the ends. It was a present for my cousin's second daughter on her second birthday, and she really liked it! Now my cousin is expecting a third, so I'll have to get at least another ball of yarn (maybe enough for a whole blanket).