These stocks are battling spiking inflation effectively and growing margins

A pedestrian wearing a protective mask walks past Visa Inc. headquarters in Foster City, California.
David Paul Morris | Bloomberg | Getty Images

Inflation has a bad hold on some companies, while other firms have a pretty good handle on dealing with the rising prices.

As inflation runs rampant, investors might consider investing in stocks that have been growing their margins and are expected to expand earnings, despite the rising wages and material costs.