I must confess that until recently I was blissfully unaware of the variability of worldwide vanilla bean costs. Not that I intentionally ignored them, mind you. They just haven't been as pressing a topic as, say, worldwide oil prices. But for a company like McCormick (NYSE:MKC), a household name in spices, the changing costs of vanilla beans are exceptionally close to the heart.

In the company's second-quarter earnings release, those lowly beans took center stage. And not as you'd expect with the skyrocketing prices for vanilla: It was just the opposite because McCormick had locked in its supply at higher than current prices. Last year, McCormick purchased a strategic supply of vanilla beans, just before a bumper crop dropped the bottom out of the market. So what do you do when you're stuck with raw material costs much higher than competitors like Alberto-Culver (NYSE:ACV) and International Flavors & Fragrances (NYSE:IFF)? You don't have many choices except to suck it up in lower margins, which is exactly what the company has been doing the last two quarters.

Second-quarter revenues grew by 5%, with volume driving a 3% lift and favorable foreign exchange rates contributing the remaining 2%. The consumer side of the business, which is what readers will be most familiar with, grew revenues by 9% for the quarter ended May 31. This was partially driven by last year's acquisition of Silvo, the spice market leader in Belgium and the Netherlands. The industrial side of the business was not as robust, notching a 2% revenue gain that was mostly driven by currency gains.

Earnings is where the bean struck its blow, with net income flat in dollars. EPS grew a penny to $0.31 on a lower share base. The company said EPS was hurt $0.02 to $0.03 by the impact of vanilla's cost on margins. Another $0.02 was lost when the company corrected an accounting issue at a condiment operation in Scotland. McCormick took a charge for this item two quarters ago, but now it says the problem is fixed.

Earnings for the first half of 2005 have been sluggish for McCormick, with EPS down a penny year over year. And it didn't please the analysts when the company lowered earnings guidance for the full year to $1.66 to $1.70, off $0.04 from prior guidance, on concerns about less favorable foreign exchange rates. But keep in mind that hitting the new targets will require an EPS growth rate of 16% to 20% over the back half of the year. The good news for McCormick is that regular costs for vanilla will again be the order of the day, and company executives went through a detailed discussion of how they expect to hit the revised targets. Primary reasons include production cost savings and improved margin/mix effects from the faster-growing consumer side of the business.

I wouldn't bet against McCormick at this point. The company has delivered consistent operating earnings growth over the past few years, and the stock has tracked this. It occupies premium shelf space in the likes of Wal-Mart (NYSE:WMT), Kroger (NYSE:KR), Albertsons (NYSE:ABS), and just about any other grocery purveyor you could name. I don't see that dominance changing anytime soon.

Looking for a consumer product company with a respected brand, solid cash flow, a decent 1.8% dividend yield, a strong position in the market, and a solid record of growth? Investors could do far worse than McCormick, particularly when analysts are turning up their noses.

For more news from the spice scene, see:

And for more on McCormick's second quarter, check out this Fool by Numbers.

Fool contributor Timothy M. Otte will be watching vanilla costs like a hawk from now on. He welcomes comments on his articles, and owns stock in Wal-Mart, but none of the other companies mentioned in this article.