Cramer: Altria's non-tobacco moves makes it a compelling stock to buy
The tobacco sector has soared in recent months even as smoking rates continue to decline and vaping becomes more popular, CNBC's Jim Cramer said Wednesday.

He gave his thoughts about the stocks of Altria and Philip Morris International , which spun off from Altria more than a decade ago.

"If I had to choose between these big tobacco titans, I'd pick Altria here as the company's taking aggressive action to offset the secular decline in smoking," the "Mad Money" host said.

The stocks of Altria and Philip Morris both plunged more than 45 percent between mid-2017 and January as electronic cigarettes such as Juul grew more popular, Cramer said. The stocks have since recovered about 35 percent of their value, which he said was a remarkable move.

Investors that frown upon owning tobacco stocks, as Cramer does, should continue to make other investments, he said. Still, Cramer said he thinks Altria's stock is more compelling.

Altria has been aggressive in transforming itself, Cramer said, spending $1.8 billion for a 45 percent stake in Canadian cannabis company Cronos Group and $12.8 billion for a 35 percent stake in Juul Labs.

"[The former] gives Altria some badly-needed growth in a brand new market that has a lot in common with the cigarette business, but doesn't kill as many people, that I know of," he said. "Juul bills itself as a safer alternative to regular cigarettes ... It's also much more effective at helping people quit smoking than Nicorette gum or the patch."

Juul has a bad reputation for underage use, but Cramer noted that the company has made efforts to decrease access to kids and suggested that it gets FDA approval for the electronic cigarette as a prescription to help smokers quit.

Philip Morris, he said, has focused too much on its own e-cigarette brand iQOS to win over vape users, but Juul is expanding overseas and could make it hard to compete with.

Additionally, the resignation of FDA Commissioner Scott Gottlieb, who has a tough stance on tobacco and vaping, cut headwinds for Altria, Cramer said. The White House could replace the outgoing official with a more-friendly one, he added.