In his recent article "4 Gotta-Have Stocks That Are Finally Cheap Enough to Buy," my fellow Fool Anand Chokkavelu wrote the following:

I frequently hear frustrated investors complain, "But look at the price charts of Wal-Mart (NYSE: WMT) and Microsoft (Nasdaq: MSFT). They haven't done anything for a decade!"

Amen. I'm an owner and a big fan of both of these stocks and have written quite a bit about how silly I think it is that they trade at their current valuations. And while there are definitely a good many Foolish readers on the same page as me, there are also quite a few readers who will chime in to complain that these are terrible investments -- and will point to the lackluster stock price chart from the past decade.

But as Anand rightly points out, while the stocks have been suffering, both companies have been quite successful. Both have significantly grown profits, raked in gobs of cash, and paid out a lot of that cash to investors in the form of dividends.

Unfortunately, investing isn't always as simple as buying great companies. You can buy the greatest company out there, but if you pay too high of a price, you may struggle to make money as the valuation comes back to earth.

Of course, this also means that just because a company's stock has been performing poorly doesn't necessarily mean that the company is a lost cause as an investment. In fact, it could be quite the opposite as years of poor stock performance pile up, investors increasingly give up on the stock, and what was once a wildly overvalued stock suddenly becomes a very attractively undervalued stock.

I think both Microsoft and Wal-Mart fit that bill. I also happen to think these three companies do as well.

Medtronic (NYSE: MDT)

Source: S&P Capital IQ and Yahoo! Finance. Operating income = trailing-12-month operating income as of Jan. 1 of each year.

A leader in the medical device field -- particularly when it comes to pacemakers and other cardiac devices -- Medtronic has been anything but static over the past decade, even though its stock hasn't done much of anything. As the graph above shows, while the stock has been falling, profits have been steadily rising. Combine those two and what you end up with is a fast-falling valuation. Back in 2001 and 2002, Medtronic's stock traded at a trailing price-to-earnings multiple in the 60s and 70s. Today it's just 12.

Of course, if you look at the numbers coming from Medtronic, it's astoundingly hard to miss the strength of the company. Return on capital over the past 12 months has been 11.2%, the operating profit margin was 29%, and with a 62% debt-to-equity ratio, the balance sheet is very reasonably capitalized.

Abbott Labs (NYSE: ABT)



Source: S&P Capital IQ and Yahoo! Finance. Operating income = trailing-12-month operating income as of Jan. 1 of each year.

Some things are particularly tough to track down. Four-leaf clovers. Perfectly fitting jeans. A low-calorie cheesecake that doesn't taste like cardboard. Dividend aristocrats.

Now Abbott Labs obviously doesn't fit most of those, but the company is, in fact, a dividend aristocrat. That means that the company has increased its dividend every year for at least 25 years. That's a long time. That's longer than many major, well-known companies have even been in existence. Of course, it's probably because of the requirement of that unusually long commitment that less than 10% of the S&P 500 companies qualify for dividend aristocrat status.

But dividend aristocrat or not, many investors would have nothing to do with Abbott today thanks to the fact that its stock has gone nowhere over the past decade. As with Medtronic, though, Abbott's profits have continued to climb in spite of the faltering stock price and that's dragged down the valuation from lofty heights early in the 2000s to less than 14 currently (if we exclude one-time charges).

The stock currently yields 3.6% and investors stand to see some extra "value realization" (there's some Wall Street talk for ya) as the company splits into two companies.

Walgreen (NYSE: WAG)

Source: S&P Capital IQ and Yahoo! Finance. Operating income = trailing-12-month operating income as of Jan.1 of each year.

And once again we have a stock that's done a whole lot of nothing for a very long time. But what of the company? From the graph we can see that it's obviously been racking up profits. It has an extremely strong balance sheet, uses its capital efficiently, and, like the other two companies above, its valuation has fallen considerably over the years. Sure, it has a tough archrival in CVS Caremark (NYSE: CVS), but it's largely a two-horse race in that market -- which ain't a bad place to be.

Oh, and remember what I was saying about Abbott being a dividend aristocrat? Well, ditto all of that for Walgreen, because it makes the cut (CVS doesn't).

The stock, the company, and your winning portfolio
Investors sometimes make mistakes. Sometimes those are very large mistakes. However, investors aren't stupid. When a stock is falling, there's often a good reason for it. In fact, in the case of all three stocks above -- or all five if you include Microsoft and Wal-Mart -- there was a good reason for the stocks to fall. The key word, of course, being "was."

Years ago, the valuations for these stocks were too high and they've been adjusting back ever since. The companies have been fine, the stocks have just been (rightly) ill.

But after years of falling valuations, we're now left with three (or five) attractive stocks with attractive companies behind them. So, dear reader, if lackluster stock performance has kept you at arm's length, this Fool humbly recommends that you tune in for another look.

You can lock on for that closer look by adding any, or all, of the stocks above to your watchlist. If you don't have a watchlist, you can create one here.